On Mar 13, 2011, at 11:05 AM, Matt Neuburg wrote: > On Tue, 08 Mar 2011 17:01:33 -0800, Steve Christensen <puns...@mac.com> said: >> The setup has a MPMoviePlayerController instance that is playing a local >> audio file. There is also a UIWebView whose HTML contains an <audio> tag. >> When the play control is tapped, I see a >> MPMoviePlayerPlaybackDidFinishNotification notification with a reason of >> MPMovieFinishReasonPlaybackEnded, then gdb shows the assertion failure and >> exception and dumps the backtrace (below). > > What was the outcome on this? Thx - m.
Well, I'm still not sure of the exact "why" for the assertion, but I figured out what I was doing that it didn't like. My MPMoviePlayerPlaybackDidFinishNotification handler is designed to queue up another audio file to play after the current one finishes. I NSLog'd the player initialization and all the notification handlers so I could watch the process more in realtime, and found that the next audio file was loaded and then very soon after got a MPMoviePlayerPlaybackDidFinishNotification. A bit after that is when the assertion failure and exception come along. After playing with it for a bit, I found that the player's loadState property is set to (MPMovieLoadStatePlayable | MPMovieLoadStatePlaythroughOK) when playback finishes normally or MPMovieLoadStateUnknown when it's stopped because another player instance has grabbed control. I've added a test that prevents the queueing if the loadState is MPMovieLoadStateUnknown and that seems to work just fine. I may have missed something in the docs that talks about this situation, but it's also probably true that I'm not using the player class in the most "standard" manner. steve _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com