Export to GitHub

jquery-tubular - issue #7

How to close autoplay?


Posted on Jul 28, 2011 by Swift Lion

I dun want to video been load while I go into the website, I want the user to click then only the video will play. Any idea for that?

Comment #1

Posted on Dec 9, 2011 by Swift Bear

Comment deleted

Comment #2

Posted on Dec 9, 2011 by Swift Bear

The documentation mentions that a div overlay is added by the javascript to PREVENT users from accidentally clicking through to youtube. So even if you modified the code to include an &autoplay=1 (which would probably work) the user would be unable to click to start the video. This tool was not designed to do that.

But your midmost youtube embed does what you want already. User clicks once for play, twice for fullscreen.

Comment #3

Posted on Feb 24, 2012 by Grumpy Rabbit

Yeah, you could modify the code to fire tubular on an event. jenkins is right -- this project isn't exactly intended for that use case. If you know JavaScript, it shouldn't be too hard to modify. I will consider this use case for the next build. Thanks for your feedback, both of you.

Comment #4

Posted on Dec 31, 2013 by Happy Hippo

Understand that this project is not intend to play video by clicking. But still anyway to stop the video from autoplay? I've try placing autoplay parameter to 0 in the javascript. but it doenst work. Any advise where to put the parameter?

Help much appreciated.

Comment #5

Posted on Feb 15, 2014 by Massive Wombat

Hey man!

In this snippet of code, line 69 - 74, comment out 72 and 73, as shown below. You'll need to manually include controls at that point, but since the plug-in was built for that, you'll be fine.

window.onPlayerReady = function(e) { resize(); if (options.mute) e.target.mute(); //e.target.seekTo(options.start); //e.target.playVideo(); }

Best of luck!

Status: WontFix

Labels:
Type-Defect Priority-Medium