Popcorn.js 不倒带

发布于 12-03 05:02 字数 500 浏览 0 评论 0原文

我正在使用 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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╭⌒浅淡时光〆2024-12-10 05:02:22

不确定你是否仍在追求这个,但我在 popcorn.capture 中闲逛,并对捕获存储库进行了一些更改,以在特定时间捕获海报,然后设置回 0。可能想给它一个尝试。

我的最终实现如下所示:

    document.addEventListener( "DOMContentLoaded", function() {

      var p = Popcorn( "#video" );
      p.listen( "canplayall", function() {

        this.capture({ at: 10 });

      });
      p.play().pause();

    }, false );

不过,我在爆米花倒带中找不到任何问题。如果您仍然遇到问题,请发布完整的工作案例,我会看一下:)

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:

    document.addEventListener( "DOMContentLoaded", function() {

      var p = Popcorn( "#video" );
      p.listen( "canplayall", function() {

        this.capture({ at: 10 });

      });
      p.play().pause();

    }, false );

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 :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文