如何识别,用户已经看完RTMP视频,我有一个触发函数的要求,在看完一个完整的视频之后。
我正在使用带有RTMP视频点播(Wowza VOD)流的JW播放器。
发布于 2017-03-22 20:29:43
JwPlayer脚本具有内置事件,如.setup、.onError、.onReady、.onComplete,如下所述。
jwplayer('#videoBox').setup({
file: videoFile,
image: "/path/to/image/videoslogo.png",
rtmp: {
securetoken: "123456789ABCD"
},
width: "80%",
aspectratio: "21:9"
});
//onError, Show a alert box
jwplayer('#videoBox').onError ( function(event) {
alert("Sorry for an inconvenience, Something went wrong, Please create a ticket, Thanks.");
});
//On Ready, play after 2000 milli seconds
jwplayer('#videoBox').onReady ( function(event) {
setTimeout(function() {
jwplayer('#videoBox').play(true);
},2000);
})
// on Complete, Change Lecture status and Assign Next entities
jwplayer('#videoBox').onComplete( function(event) {
//Trigger required function here
});
希望能对某些人有所帮助。谢谢
https://stackoverflow.com/questions/42923064
复制相似问题