Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering at the end #63

Open
serge852 opened this issue Mar 10, 2017 · 1 comment
Open

Flickering at the end #63

serge852 opened this issue Mar 10, 2017 · 1 comment

Comments

@serge852
Copy link

The video flickers at the end, and it's very annoying with short loops.

BUT if you set an interval shortly before the end and rewind, flickering goes. Also set repeat=false in defaults.

'onStateChange': function(e) {
          if (e.data === 1) {

            self.$node.find('img').fadeOut(400);
            self.$node.addClass('loaded');
            
            setInterval(function() { self.player.seekTo(self.options.start)}, RewindVideoAtTiming);
            
          } else if (e.data === 0 && self.options.repeat) { // video ended and repeat option is set true
            self.player.seekTo(self.options.start);
          }
        }

I set RewindVideoAtTiming manually, and setInterval isn't aware that playback could have been paused for scrolling, there must be less dirty way to do this.

@ianhoyte
Copy link

I'm seeing the flicker too.

Thanks to Babyasin, I've incorparated the RewindVideoAtTiming into my options and set the default to false, but this isn't ideal as it breaks our bower instance. Any word on a fix for this?

defaults: {
    rewindVideoAtTiming: false,
....
if (self.options.rewindVideoAtTiming != false) {
    setInterval(function() { self.player.seekTo(self.options.start)}, self.options.rewindVideoAtTiming);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants