How can I set a Video to autoplay on my page?

You can easily trigger a YouTube or Vimeo video to automatically play when a user lands on your SpaceCraft site. To begin, embed a video normally by following the steps below.

Important: The autoplay feature does not work on mobile or tablet devices. Please refer to this documentation by Google for more information: Autoplay.

1. Copy the embed code from the Share tab on the video's page on YouTube/Vimeo.
2. Then, paste the code into the Video block in your SpaceCraft Content tool.

EXAMPLE: The normal embed share code will look like this for Youtube:

<iframe width="560" height="315" src="https://www.youtube.com/embed/EVnjZnJ5_cg" frameborder="0" allowfullscreen></iframe>

EXAMPLE: The normal embed share code will look like this for Vimeo:

<iframe src="https://player.vimeo.com/video/161181924" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="https://vimeo.com/161181924">SpaceCraft Overview</a> from <a href="https://vimeo.com/user16784630">go_spacecraft</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

3. Now, follow steps for either of the options below that pertain to where video is uploaded: 

 

A) For YouTube videos:

1. To modify the code to include an autoplay function, simply insert this after the alphanumeric code:

?rel=0;&autoplay=1

This is located at the end of the (youtube.com) hyperlink, inside the quotation mark that appears before "frameborder".

The new code will look like this:

<iframe width="560" height="315" src="https://www.youtube.com/embed/iG9CE55wbtY?rel=0;&autoplay=1" frameborder="0" allowfullscreen></iframe>

2. Select the green Publish button to make your changes live.

 

B) For Vimeo videos:

1.To modify the code to include an autoplay function, simply insert this after the alphanumeric code:

?autoplay=1

This is located at the end of the "vimeo.com" hyperlink, inside the quotation mark that appears before "width".

The new code will look like this:

<iframe src="https://player.vimeo.com/video/161181924?autoplay=1" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="https://vimeo.com/161181924">SpaceCraft Overview</a> from <a href="https://vimeo.com/user16784630">go_spacecraft</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

2. Select the green Publish button to make your changes live.

Your video will now begin playing immediately when the page is loaded.

Powered by Zendesk