页面加载时在 Flowplayer 中查找
我想在页面加载时寻找一个流播放器。
我尝试过:
$(document).ready(function() {
$f(0).seek(5);
});
and
$(document).ready(function() {
while(!$f(0).isLoaded()) {
$f(0).seek(5);
}
});
and
$(document).ready(function() {
$f(0).onLoad(function() {
$f(0).seek(5);
});
});
and 这个给出了结果,有一段时间
$f(0).onLoad(function() {
$f(0).seek(5);
});
最后一个将指针移动到 5 秒,然后又回到开始处。 我想让它站在那里。
有什么建议吗?
I want to seek a flowplayer at the page load.
I have tried:
$(document).ready(function() {
$f(0).seek(5);
});
and
$(document).ready(function() {
while(!$f(0).isLoaded()) {
$f(0).seek(5);
}
});
and
$(document).ready(function() {
$f(0).onLoad(function() {
$f(0).seek(5);
});
});
and this one gave result, for a while
$f(0).onLoad(function() {
$f(0).seek(5);
});
The last one moved the pointer to 5 seconds, and back to the start right after.
I want it to stand there.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
官方答复:
http://flowplayer.org/forum/3/101287#post-101528
看起来我只是因为放了一个链接而被否决了,这是可以理解的,因为 flowplayer 已经更改了他们的论坛 URL!
https://web.archive.org/web/20120629142246/http://flowplayer.org/forum/3/101287
这是操作
和响应
official answer:
http://flowplayer.org/forum/3/101287#post-101528
looks like I was downvoted for just putting a link, and that is understandable as flowplayer has changed their forum URLS!
https://web.archive.org/web/20120629142246/http://flowplayer.org/forum/3/101287
Here is the OP
and the response
我认为在某些情况下,暂停玩家、跳到首选位置并重新开始会有所帮助。当您将 Flowplayer 配置为自动缓冲时,它将开始播放并在第一帧暂停。这也许可以解释您所看到的行为(寻求 5,跳转到 0,然后再次跳转到 5。但我认为您使用加载事件的修复很好地解决了这个问题,我使用了类似的技巧来等待持续时间变为可用的。
I think in some cases it would help to pause the player, jump to the prefered position and the start again. When you have Flowplayer configured to auto buffer it will start playing and pause at the first frame. That could maybe explain the behavior you are seeing (seek to 5, jump to 0 and jump to 5 again. But I think your fix using the load event pretty well solves it, I've used a similar trick to wait for duration to become available.
解决了!
使用
然后它寻找 5,由于某种原因跳回到 0,并再次寻找 5。
Solved it!
Used
Then it seeked to 5, jumped back to zero for some reason, and seeked to 5 again.