How to change preview image at onComplete event?
I'm using the following source code to display a video file using jwpalyer.
jwplayer('mediaplayer').setup({
'id': 'mediaplayer',
'width': '649',
'image': "<?=$siteURL?>/views/index/preview.jpg",
'height': '300',
'file': '<?=siteURL?>/开发者_JAVA技巧views/index/video.mp4',
'flashplayer': '<?=siteURL?>/scripts/jwplayer/player.swf',
'modes': [
{type: 'flash', src: '<?=siteURL?>/scripts/jwplayer/player.swf?autostart=true'},
{
type: 'html5'
},
{type: 'download'}
],
'events': {
onComplete: function(e){
}
}
});
I would like to change 'image' at the end of the video. I added 'onComplete' event, but I have no idea how to change 'image' property only.
I have read jwplayer api and googled, had no luck..
Add this inside the onComplete
function:
this.load({
"file": "originalvideofile.mp4",
"image": "newimage.jpg"
});
精彩评论