• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MPMoviePlayerController setContentURL twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Exception not being caught
  • Next by Date: Re: Exception not being caught
  • Previous by thread: Re: Popover Shrinks beyond Indicator
  • Next by thread: Re: MPMoviePlayerController setContentURL twice
  • Index(es):
    • Date
    • Thread