Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 897999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:58:17+00:00 2026-05-15T14:58:17+00:00

Hi i have created app for ipad , it has an video files in

  • 0

Hi i have created app for ipad , it has an video files in resource folder and it plays when the user click play button.
It works for first time user clicks play button but when user plays subsequent times of video file.The issues occurs that is the video is not play only audio is playing.These issues occurs not randomly but some more times it will occurs.

One more thing at the time of issue occurs (Video is not playing ) , when i click the wo-arrow icons located at the bottom right corner of the player the movie goes to full screen and it shows video .At the time video is playing.

Can any one help me ?

Here is my sample code

    MPMoviePlayerController *moviePlayer;

}
@property (readwrite, retain) MPMoviePlayerController *moviePlayer;
@synthesize moviePlayer;

    - (void)viewDidLoad {
 [[NSNotificationCenter defaultCenter] 
  addObserver:self
  selector:@selector(movieFinishedCallback:)
  name:MPMoviePlayerPlaybackDidFinishNotification
  object:self.moviePlayer];
 [super viewDidLoad];
    }


    -(IBAction)PlayBtnPressed:(id)sender
{

 NSURL *movieURL;
 NSString *moviePath = [[NSBundle mainBundle] pathForResource:@"title" ofType:@"mp4"];
 movieURL = [NSURL fileURLWithPath:moviePath];
 // Initialize a movie player object with the specified URL
 MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
 if (mp)
 {
  // save the movie player object
  self.moviePlayer = mp;
  [mp release];

  UIInterfaceOrientation orientation = [[UIDevice currentDevice]orientation];
  [self shouldAutorotateToInterfaceOrientation:orientation];
  // Play the movie!
  [self.view addSubview:self.moviePlayer.view];
  [self.moviePlayer play];
 }
}


     - (void) movieFinishedCallback:(NSNotification*) aNotification {
   NSLog(@"movieFinishedCallback aNotification");
     MPMoviePlayerController *player = [aNotification object];
     [[NSNotificationCenter defaultCenter] 
   removeObserver:self
   name:MPMoviePlayerPlaybackDidFinishNotification
    object:player]; 
    [player stop]; 
    [player.view removeFromSuperview];
  }

Thanks in advance ……..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:58:18+00:00Added an answer on May 15, 2026 at 2:58 pm

    Looks like the movieplayer is not getting released until after you’ve allocated a second one on the same movie file:

    self.moviePlayer = mp;
    

    retains it, but the movie finished part doesn’t do a

    self.moviePlayer = nil;
    

    Could be that’s causing you problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an iPad app that has 10 view controllers that swipe left
I have my ipad code created programmatically not using nib.I converted my ipad app
I have created an app to standardize user creation for our AD domain. Now
I have created 3 files for the app icon: Icon.png, Icon-72.png, and Icon@2x.png. Icon@2x.png
iPad app. OS 4.2. I have a button that, when pressed, calls this function
I have created split view based ipad app, where master view is table view
I have created an iPad app which I want to send to another branch
Our company created an iOS app that has an iPhone version and an iPad
I have an iPad app created using XCode 4 with Storyboard. I have a
I have an iPhone app and would like to create iPad version of it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.