开发者

Popcorn.js not rewinding

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)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜