How can I replace "stream not found" error with a picture
Hi, As I mentioned in the title, How can I replace "stream not found" error with a picture o?r another video. I dont want to see the "stream not found" error. When there is no video to stream, I want a picture or another video on screen. Thanks for help...
There is an onError() event the player fires when this occurs. You can use this event to present a nicer error message. How to do this is up to you: you can load() a short “error” video in the player, you can place an error message on top of the player or you can replace the entire player with a formatted error message.
This will load a video called “error.mp4” if an error occurs. Instead, you could also use javascript to remove the entire player and print a custom error message.
I changed the error code to display an image instead of an video. It works well and shows the image in a browser that shows Flash, but on iPad that uses the Html5 mode it doesn't show the image as the error message. It seems to attempt to do something when the error occurs, but it doesn't show the image that I specified. Any ideas for the code I posted above?
In HTML5, we do not support “playing” images. I think that’s the issue.
It’s very easy to create a video from an image with something like quicktime. Just open the image, then “select all” and “paste” a few times. You then copy the single image frame into multiple frames. Export as a small MP4 video and done.
I also want to show an image instead of a error, can this be done within the embed code? I dont have much code knowledge but this my code embed code if somebody can help;
<script type="text/javascript"> var so = new SWFObject("/player/jwplayer/player.swf","mpl","960","480","9"); so.addParam("allowscriptacces","always"); so.addParam("allowfullscreen","true"); so.addParam("flashvars","skin=/player/jwplayer/skin/skin2.zip&autostart=false&dock=false&provider=http&stretching=false&"); so.write("player"); </script>
I'm trying to do this same thing. My code is as follows:
<script type='text/javascript'> var so = new SWFObject('player.swf','mpl','640','360','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('file','test.flv'); so.addVariable('image','testing.jpg'); so.addVariable('streamer','rtmp://XXX-XXX-XXX-XX.compute-1.amazonaws.com:1935/live'); so.addVariable('stretching','exactfit'); so.addVariable('autostart','true');
so.write('mediaspace'); </script>
How would I need to modify my code to have an image display once the stream is turned off or not found?