brilliant
brilliant

Reputation: 2863

How to stop auto play of embedded video?

Here is a video clip from metacafe.com that I am trying to embed:

<!DOCTYPE html>
<html>
<body>

<table>
<tr>
<td>
<iframe 
width="720" height="405" 
src="http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4$autoStart=false" 
frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen>
</iframe>
</td>
</tr>
</table>

</body>
</html>

Embedding is okay, except the clip starts playing automatically once the page is loaded. How can I stop the autoplay here?

I tried the following options, but none of them worked:

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4/&autoStart=false

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4/&autoStart=0

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4/?autoStart=false

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4/?autoStart=0

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4&autoStart=false

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4&autoStart=0

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4?autoStart=false

http://www.metacafe.com/embed/11600739/natasha-the-founder-of-easy-peasy-lemon-squeezy-forms-the-secrets-to-form-a-saas-application-mp4?autoStart=0

I also tried using autoPlay instead of autoStart in all these options, but it didn't help either.

Upvotes: 0

Views: 1238

Answers (1)

Mick
Mick

Reputation: 25496

The link you have as the source for the iFrame is a link to a web page, not to a video.

You can see this by loading the link in a browser and then 'inspecting' the page with developer tools.

That web page then contains the link to video itself and a player, which has autoplay set so the video starts immediately.

If you have access to the video link then you may find it easier to add it to your own page - the video looks like at least one version of it is a HLS file so you will need either a JavaScript web player or a browser which supports HLS natively - using a player is safer as it offer wider support.

Upvotes: 1

Related Questions