views:

108

answers:

1

I am using the MediaPlayer framework to play a movie on the iPhone. There is a notification:-

myMovieFinishedCallback

to capture the end of play, but there doesn't appear to be any way to distinguish between the player coming to the end of the movie, and the user pressing 'Done' to terminate mid-play.

Is it possible to tell the condition of the finish?

I have managed to create a log of all notifications sent by the player, and I have seen this and some other notification candidates, which I believe are triggered by clicking 'Done', that might be useful:-

NSConcreteNotification 0x45534d0 
    {name = AVController_TimeHasJumped; object = <AVController: 0x4525620>; 
    userInfo = {"AVController_Time" = 31.02737777777778;
    }}

Having managed to view the notification however, I'm not sure how I can use the log information to fire the right handling in my app. Can anyone clarify how, having managed to view it, I can exploit NSNotification information and fire events based on notices passing through?

Thanks in advance for any hints in this area!!

A: 

I'm drawing the conclusion that it isn't possible! The notification trace for both a premature finish initiated by the user and the player naturally reaching the end of the clip appear to be the same, the only clue is that you do get access to the timecode at the end of play, so if you know the duration of your movie, you can make a pretty good guess.

Purpletoucan