You can easily trigger a YouTube or Vimeo video to automatically play when a user lands on your site.
Before you add an autoplay video on your website, there are two things to keep in mind:
<iframe width="560" height="315" src="https://www.youtube.com/embed/TA-3Bsxabok?playlist=TA-3Bsxabok&autoplay=1&controls=0&loop=1&mute=1" frameborder="0" allowfullscreen></iframe>
1. To modify the code to include an autoplay function, you will want to add this code to an HTML Block:
<iframe src="https://player.vimeo.com/video/305795958?background=1&autoplay=1&;title=0&;byline=0&;portrait=0&;loop=1&;autopause=0&;muted=1" width="640" height="360" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
2. Replace the video ID in the code with the video ID from your Vimeo video. The video id is the number that immediately follows player.vimeo.com/video/ and ends before the ? symbol. In the above code, the video ID is the number 305795958. Replace that code with your video's ID.
3. Select the green Publish button to make your changes live.