寻求及时工作。例如,如果我寻求(160),它就有效。 但是,如果我试图向后寻求(30),它会回到160.这发生在歌剧,铬; 在Firefox中应该像它应该的工作。
Seeking forward in time works.If I seekTo(160), for example, it works. But, if I try to seek backwards seekTo(30), it sets back to 160. This happens in opera,chrome; works like it should in firefox.
最满意答案
我有同样的问题你有描述。 我不知道它是否可以提供帮助,但我发现在查询视频持续时间的API后,寻找以前的位置似乎有效...
我需要做一个“重播”的事情所以我所做的是:
var duration = player.getDuration(); player.seekTo(duration-duration, false); // equals to video exact start time which should be the same as 0 player.playVideo();我的测试表明这样做
player.seekTo(0, false);在被查询的持续时间之后工作但是我不想冒任何机会:-)
I had the same problem has you described. I don't know if it can help but I found out that after you query the API for the video duration, seek to previous location seemed to work...
I needed to do a "replay" kind of thing so what I've done is :
var duration = player.getDuration(); player.seekTo(duration-duration, false); // equals to video exact start time which should be the same as 0 player.playVideo();My tests showed that doing
player.seekTo(0, false);was working after the duration has beed queried but I didn't wanted to take any chances :-)
更多推荐
发布评论