I'm trying to get a notification from a MPMoviePlayerController when the movie has reached its end. I'm running the player in embedded mode with a local file.
Like the docs suggest, I registered for MPMoviePlayerPlaybackDidFinishNotification and check if the MPMovieFinishReason key contains the intValue of MPMovieFinishReasonPlaybackEnded. That's working fine.
But I get the same notification with MPMovieFinishReasonPlaybackEnded when I switch the movie using the contentURL property before it has actually reached its end. So I tried this solution and checked if endPlaybackTime == -1, but that's true in both cases.
The only workaround I found so far is to remove the observer before changing contentURL and then adding it again, but I think there must be a more elegant solution?