MPMoviePlayerController setContentURL twice
MPMoviePlayerController setContentURL twice
- Subject: MPMoviePlayerController setContentURL twice
- From: Heath Borders <email@hidden>
- Date: Mon, 21 Mar 2011 16:04:52 -0500
I create an embedded MPMoviePlayerController thusly inside my loadView method:
self.moviePlayerController = [[[MPMoviePlayerController alloc] init]
autorelease];
// add to view, setup moviePlayerController's view frame, etc
And I can later load a movie the user chooses thusly:
NSURL *fileUrl = ...
self.moviePlayerController.contentURL = fileUrl;
and everything works great.
However, if I set the contentURL again:
NSURL *fileUrl2 = ...
self.moviePlayerController.contentURL = fileUrl2;
This does not work, even if fileUrl2 == fileUrl1.
When I change the contentURL, I get the following playbackState and loadState:
After first setContentURL:
loadState == playable | playthroughOK
playbackState == playing
After my second setContentURL:
playbackState == stopped
loadState == unknown
I can of course create a new MPMoviePlayerController for every movie,
but I want to make sure this issue isn't indicative of a larger
problem.
Thanks!
-Heath Borders
email@hidden
Twitter: heathborders
http://heath-tech.blogspot.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden