Is there a way to catch exceptions (especially for network errors / no connection available) when using MPMoviePlayerController?
I am particularly concerned that after the player instance is initialized using initWithURL: you have no way to find out for some reason that the movie download failed to load.
I looked through the available documentation and realized that I could receive a notification for loadState changes through
moviePlayerLoadStateChanged:(NSNotification*)notification.
The problem is that loadState constants are not suitable for error handling:
MPMovieLoadStateUnknown MPMovieLoadStatePlayable MPMovieLoadStatePlaythroughOK MPMovieLoadStateStalled
(in case you are interested, MPMovieLoadStateStalled is this not caused during network errors for some reason?)
There is an outdated MPMoviePlayerContentPreloadDidFinishNotification , which provides a userInfo dictionary with the key "error", but nothing for iOS 3.2 and higher.
Any help would be greatly appreciated.
mpmovieplayercontroller
Rog
source share