Adding controls and disable autoplay in an iFrame.

LurkerLou

Active member
Sample,
Code:
<iframe width="{$width}" height="{$height}" src="http://blank.com/embed/{$id}" allowfullscreen="" frameborder="0" scrolling="no"></iframe>

Since the videos will be MP4's, how would I add controls and stop autoplay in the iframe? I've tried the following to no avail.

Code:
<iframe width="{$width}" height="{$height}" src="http://blank.com/embed/{$id}" allowfullscreen="" controls="" autoplay="" frameborder="0" scrolling="no"></iframe>
<iframe width="{$width}" height="{$height}" src="http://blank.com/embed/{$id}" allowfullscreen="" controls="controls" autoplay="false" frameborder="0" scrolling="no"></iframe>
<iframe width="{$width}" height="{$height}" src="http://blank.com/embed/{$id}" allowfullscreen="" controls="0" autoplay="0" frameborder="0" scrolling="no"></iframe>
 
That depends on the site you're trying to embed media from. For instance, you can add "&autoStart=false" or "&autoplay=false" at the end of the src and see if that works for you.

Like this (for YouTube):

Code:
<iframe width="{$width}" height="{$height}" src="http://blank.com/embed/{$id}&autoplay=false" allowfullscreen="" frameborder="0" scrolling="no"></iframe>
 
Back
Top Bottom