views:

1442

answers:

3

On the iphone, when trying to play a broken url using MPMoviePlayerController the user gets an alertbox with the message "the server is not correctly configured".

Is there any way to change this to something more user-friendly? Alternatively, is there any way to get an error status from the player instead of getting this message?

Thanks in advance..

+1  A: 

MPMoviePlayer provides two notifications for the case of a broken / invalid movie URL:

From MPMoviePlayer initWithContentURL:

To check for errors in URL loading, register for the MPMoviePlayerContentPreloadDidFinishNotification or MPMoviePlayerPlaybackDidFinishNotification notifications.
On error, these notifications contain an NSError object available using the @"error" key in the notification’s userInfo dictionary.

You should be able to hook to one oh these notifications and perform the needed actions
if a broken URL is about to be loaded.

Shirkrin
thanks. this is not working exactly as i expected but this gets me part of the solution.
Nir Levy
A: 

Hi Nir,

Did you manage to solve this issue? I have been trying somehow to hide that alert or change its text but without success. If you did manage to come up with a solution please explain.

Alex1987
Comments are the way. Or open your own question.
Georg
i was not able to get this to work yet. will update the question if i will. but don't hold your breath as it's not coming up anytime soon :-)
Nir Levy
A: 

Usually this error message means that the web server that's serving the file does not support HTTP byte ranges.

iPhone OS uses HTTP byte ranges for streaming audio and video content. This makes it possible to "scrub" forwards and backwards in the content without downloading the entire content first.

ddkilzer