Popcorn.js 不倒带
我正在使用 Popcorn.js 及其扩展 爆米花捕获。
我有以下代码:
function setVidPoster() {
var video = Popcorn( '#bzm_video' ), poster;
video.listen( "canplayall", function() {
this.capture({at: 1});
this.currentTime(0);
});
}
我试图捕获 1 秒的图像作为海报,但是视频播放器实际上移动到 1 秒并在那里显示。从爆米花捕获文档中,我假设这不会发生,但我不知道如何将视频移动到开头(据我所知,当前时间应该在文档中工作)
I'm using Popcorn.js and its extension Popcorn Capture.
I have the following code:
function setVidPoster() {
var video = Popcorn( '#bzm_video' ), poster;
video.listen( "canplayall", function() {
this.capture({at: 1});
this.currentTime(0);
});
}
I'm trying to capture the image 1 second in as the poster, however the video player actually moves to 1 second and says there. From the Popcorn capture documentation I'm assuming this isn't meant to happen, but I can't figure out how to move the video to the beginning (currentTime should be working afaik from the documentation)
不确定你是否仍在追求这个,但我在 popcorn.capture 中闲逛,并对捕获存储库进行了一些更改,以在特定时间捕获海报,然后设置回 0。可能想给它一个尝试。
我的最终实现如下所示:
不过,我在爆米花倒带中找不到任何问题。如果您仍然遇到问题,请发布完整的工作案例,我会看一下:)
Not sure if you're still pursuing this, but I poked around in popcorn.capture, and pushed some changes to the capture repo, to get a poster captured at a certain time, and set back to 0. Might want to give it a try.
My final implementation looked like this:
I could not find any problems in Popcorn rewinding, though. If you're still having problems, post a complete working case, and I'll take a look at it :)