Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an embedded video not autoplay

Tags:

flash

autoplay

I'm embedding a Flash video into an HTML and would like the user to have to click it to begin playing. According to the Adobe <object> / <embed> element documentation, there are variety of methods to do this:

1) Add a Flash parameter inside the <object> tag:

<param name="play" value="false">

2) Add the attribute play inside the <embed> tag:

<embed ... play="false">

3) Add the attribute flashvars inside the <embed> tag:

<embed ... flashvars="play=false">

Which is awesome. Only ... none of them work for me:

http://johnboxall.github.com/test/flash/flash.htm

My code looks like this now:

<object width="590" height="475">
    <param name="movie" value="untitled_skin.swf">
    <param name="play" value="false">
    <embed src="untitled_skin.swf" width="590" height="475" type="application/x-shockwave-flash" play="false" flashvars="autoplay=false&play=false" menu="false"></embed>
</object>

Anyone have any ideas? What am I doing wrong?

like image 659
jb. Avatar asked Dec 30 '08 02:12

jb.


People also ask

How do I turn off autoplay on embedded videos?

Disable Autoplay Videos in Chrome on Android Android makes disabling autoplay videos simple. First, launch Chrome on your phone or tablet and go to Settings > Site Settings. Next, scroll down the menu and tap on Media, and then Autoplay and toggle the switch off.

How do you stop videos from automatically playing embedded on Iphone?

Short guide: Open the Settings app and tap Accessibility. Tap Motion. Tap the toggle switch for Auto-Play Video Previews to turn it off.

How do I stop video autoplay in HTML?

To disable video autoplay, autoplay="false" will not work; the video will autoplay if the attribute is there in the <video> tag at all. To remove autoplay, the attribute needs to be removed altogether.


2 Answers

A couple of wires are crossed here. The various autoplay settings that you're working with only affect whether the SWF's root timeline starts out paused or not. So if your SWF had a timeline animation, or if it had an embedded video on the root timeline, then these settings would do what you're after.

However, the SWF you're working with almost certainly has only one frame on its timeline, so these settings won't affect playback at all. That one frame contains some flavor of video playback component, which contains ActionScript that controls how the video behaves. To get that player component to start of paused, you'll have to change the settings of the component itself.

Without knowing more about where the content came from it's hard to say more, but when one publishes from Flash, video player components normally include a parameter for whether to autoplay. If your SWF is being published by an application other than Flash (Captivate, I suppose, but I'm not up on that) then your best bet would be to check the settings for that app. Anyway it's not something you can control from the level of the HTML page. (Unless you were talking to the SWF from JavaScript, and for that to work the video component would have to be designed to allow it.)

like image 138
fenomas Avatar answered Oct 11 '22 02:10

fenomas


I had the same problem and came across this post. Nothing worked. After randomly playing around, I found that <embed ........ play="false"> stopped it from playing automatically. I now have the problem that I can't get a controller to appear, so can't start the movie! :S

like image 23
james Avatar answered Oct 11 '22 03:10

james