ersofis / jquery-tubular

Automatically exported from code.google.com/p/jquery-tubular
MIT License
0 stars 0 forks source link

How to close autoplay? #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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?

Original issue reported on code.google.com by *y...@icrmdigital.com on 28 Jul 2011 at 6:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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.

Original comment by jenkins2...@gmail.com on 9 Dec 2011 at 1:42

GoogleCodeExporter commented 8 years ago
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.

Original comment by seanmcca...@gmail.com on 24 Feb 2012 at 5:02

GoogleCodeExporter commented 8 years ago
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.

Original comment by alfred.f...@gmail.com on 31 Dec 2013 at 4:23

GoogleCodeExporter commented 8 years ago
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!

Original comment by udell...@gmail.com on 15 Feb 2014 at 8:46