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

autoplay:false doesn't seem to work #27

Open
JayCarney opened this issue Feb 4, 2014 · 2 comments
Open

autoplay:false doesn't seem to work #27

JayCarney opened this issue Feb 4, 2014 · 2 comments

Comments

@JayCarney
Copy link

setting autoplay: false doesn't prevent video from playing as soon as loaded,

@iuliangcata
Copy link

+1 to this

@josheigel
Copy link

Since this plugin isn't support any more, I thought I'd just write what I did to fix this autoplay issue (even if it is too late to help you guys out, hopefully someone else will be able to use this fix).

In the jquery.videoBG.js file on line 274, there is a conditional there to check for browser support for videos. If videos are supported by the browser, then the video autoplays even when the autoplay option is set to false.

On line 274, change:
if ($.fn.videoBG.supportsVideo()) {
to this:
if ($.fn.videoBG.supportsVideo() && options.autoplay) {

I hope this helps!

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

3 participants