iphone - MPMoviePlayerController - unable to play movies in my app on < 3GS (3GS is fine) -
In my app, I have some movies going on. I have checked the information for movies and they can see it They should be able to handle MPMoviePlayerController
(Bitrate, etc.)
They are streaming from a URL, and it plays only on 3GS , nothing less I have tried to collect the error of notification in MPMoviePlayerController
MPMoviePlayerContentPreloadDidFini ShNotification
and MPMoviePlayerPlaybackDidFinishNotification
but I'm getting a useless error string for User Info
in the key notification, which does not tell me anything but it is true that The movie could not be played.
The URL I am testing with:
MPMoviePlayerController appears on a 3G or 2G iPhone and it tries to load the movie for some time but Then back to where the footage came from the controller fades
Does anyone have a clue to play the reason that I am unable to stream and the above mentioned URL is only on a 3GS? I'm sure this is a memory issue, but I have worked with 50 MB of free memory on a 2G iPhone and it still does not work.
I'm using a piece of code to stream movies from Apple's own Sample App to start the movie:
MPMoviePlayerController * mp = [[ MPMoviePlayerController alloc] initWithContentURL: [NSURL URLWithString: "" http://movies.apple.com/movies/independent/lawabidingcitizen/lawabidingcitizen_h 480.mov "]; If (mp3) {self.moviePlayer = mp; [MP Release]; [Self. Play Movie Player]; }
thanks
I think the release part will give you Having trouble, I am using this code and I do the right thing:
This code is all ready for iOS. If you only want to & lt; 3.2 Use the right part.
You should apply a method to moviePlayBackDidFinish:
to receive a notification to run the movie, as follows:
/ ////////////////////////////////////////////// ////////////// // Notification is said to be that when the movie is over, this call is only for iOS 3.2 - (Zero) Movie PlayBackDidFinish: (NSNotification *) Notification {// Unregister [[NSNotificationCenter defaultCenter] to remove observer: Own name: MP3 MPVplayerplaybackDefinition Object: zero]; // Your full code is here.)
You must declare in your UIViewController @interface
and in your dealloc Dealloc:
method.
Comments
Post a Comment