Reputation: 169
I am using JWPlayer(licensed version). But If Flash player is not installed it gives the error
"Error loading player: No playable sources found"**.
When above error is displayed, i have to show alert message using JavaScript for that i had used onError event but its not working.
Below is the code which work fine except onError event.
jwplayer("container").setup({
flashplayer: "<?php echo $this->getSkinUrl('video/mediaplayer/jwplayer.flash.swf') ?>",
autostart: true,
file: "<?php echo $this->getSkinUrl('video/').$video ?>",
//type: 'mp4',
controls:false,
logo: {
hide: true,
position: 'top-left'
},
width: '432',
height: '648',
stretching:'fill',
screencolor:'FFFFFF',
events: {
onError:function({alert('Error');},
onComplete: function() {document.getElementById('vid').style.display="none" ;}
}
});
Upvotes: 0
Views: 4617
Reputation: 191
JW Player does not yet expose "Setup" errors like this one. The onError() event does include all "Media" errors.
Setup errors need to be caught differently, since at that point the JavaScript API itself is actually not yet available. The task for adding this can be tracked here:
http://developer.longtailvideo.com/trac/ticket/1450
Upvotes: 1