admin管理员组文章数量:1391964
I am using latest JW Player cloud hosted version.
I need to seek the video to start from certain position and stop at certain position using seek()
, onTime()
and stop()
.
jwplayer().onReady(function() {
jwplayer().seek(300).onTime(function(event) {
if(event.position>330) {
jwplayer().stop();
}
});
});
The video starts and stops with the above mand, but if the user clicks on play button again, it starts from beginning instead of the time specified in seek()
.
I have advertisement associated with this video.
Any help!
Thanks
I am using latest JW Player cloud hosted version.
I need to seek the video to start from certain position and stop at certain position using seek()
, onTime()
and stop()
.
jwplayer().onReady(function() {
jwplayer().seek(300).onTime(function(event) {
if(event.position>330) {
jwplayer().stop();
}
});
});
The video starts and stops with the above mand, but if the user clicks on play button again, it starts from beginning instead of the time specified in seek()
.
I have advertisement associated with this video.
Any help!
Thanks
Share Improve this question edited Jul 15, 2014 at 6:23 j809 1,4991 gold badge12 silver badges22 bronze badges asked Jul 15, 2014 at 6:14 PradinoPradino 4621 gold badge5 silver badges20 bronze badges1 Answer
Reset to default 6you could try using onBeforePlay() method, its fired just before playing, as:
jwplayer('player').setup({
......
});
jwplayer().onBeforePlay(function(){
jwplayer().seek(300);
});
本文标签: javascriptjwplayer using seek()onTime() and stop() to play part of the videoStack Overflow
版权声明:本文标题:javascript - jwplayer: using seek(), onTime() and stop() to play part of the video - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744751324a2623196.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论