Set Video to Autoplay
You can easily trigger a YouTube or Vimeo video to automatically play when a user lands on your liveBooks website. Start with the same method to embed a video normally:
1. Copy the embed code from the Share tab on the video's page on YouTube/Vimeo
2. Paste the code into the Video block in your liveBooks 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> |
For YouTube:
1. To edit the code to autoplay, 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
For Vimeo:
1. To edit the code to autoplay, 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> |
2. Select the green Publish button to make your changes live
Your video will now begin playing immediately when the page it's on is opened.