JWPlayer Show image on error
I am using player.onError event handling (JWPlayer 6) to load a error.mp4 video when our livestream is offline or not available.
Problem with this is that the error video is reloaded once it ends which creates 1-2 seconds of loading time and doesn't look good.
I read in few posts in JWPlayer forum that its possible to show a image aswell or even replace the player itself with a custom image in event handling, but none of the posts in forum actually provided the way to do so.
My current code is as follows:
<div id="myElement">Loading the player...</div>
var playerInstance = jwplayer("myElement");
I want to use a static error.png image so I can use the onBuffer event or such to check the RTMP livestream in realtime and when its online, load it instead.