How can you tell when Flowplayer has crashed with an error when Livestream breaks due to encoder crash, loss of internet stream, or other technical difficulties?
What I would like to do is display a video telling viewers what steps to take in order to get Livestream back or perhaps display a “We are sorry” image.
The Flowplayer Configuration Page shows a Player Event Listener named onError that’s useful:
Practical Example:
Whenever the
onError Player Event Listeneris invoked, it will fire your function. Then, you can test viaif statementsor if many codes are needed useswitch-case conditionalto see what error was triggered and take the appropriate action from there (e.g., different rules depending on what error code was detected can be done).Reference example of using
FlowPlayer onError Player Event Listenerfor error200:The Delivery:
If you already have a multimedia lightbox type script on the website, you can take advantage of that to trigger an image, video, HTML webpage via iframe, etc. to relay any directions to the viewer instead of the
.jpgimage method above. Many lightbox scripts have callback options and that can be used to log the successful delivery of error messages (logged via AJAX post for example) to take this “damage-control” even further.