问题
I have a website where I show a stream to my visitors using the jwplayer.
I want to know if there is a way to replace the video with an image in jwplayer when the stream is out instead of that error message?
回答1:
Absolutely.
http://support.jwplayer.com/customer/portal/articles/1442607-example-a-custom-error-message
jwplayer().onError(function(){
jwplayer().load({file:"http://www.com/errorfile.mp4",image:"http://www.com/errorfile.jpg"});
jwplayer().play();
});
来源:https://stackoverflow.com/questions/29633386/jwplayer-display-image-when-no-video-detected