Change error message when video is not available

Hello


I'm trying to play a live stream. When the stream is active everything works fine. However, the stream is active only certain days a week. The rest of the time if I try to watch, I get black screen with a message that reads "An error occurred loading this content" and an OK button. What I want to do is change the message to "This stream is only available on weekends." however I don't know how to do this.


I have used the playbackError event and it returns an IKJSError with code -1008, description: resource unavailable and domain: NSUrlErrorDomain. This Error also has an underlyingError (also IKJSError) with code -12884, description: “The operation couldn't be completed. (CoreMediaErrorDomain error -12884 - Playlist File not received)”.


I tried presenting a modal screen when the playbackError event occurs, but this doesn't work. The original message is always displayed.


Is there any way to modify this?

Replies

Have you tried stopping the player then displaying your modal?
You could also do a check to determine if the current time is during the weekend and pushing an error screen if true prior to attempting to play the stream.