Forum Discussion
Embedding a youtube video as a web object - I cannot get the video to autoplay
Hi Andrew,
Good day!
The issue with autoplay is usually more on the browser’s autoplay settings or policy rather than the actual code. For instance, Chrome changed its policies to disable autoplay when there is no user interaction on the page. Storyline was able to create a workaround but this is only for non-embedded videos.
For your embed code, I’ve made some minor changes to stop the video playing after 176 seconds and to make it autoplay (only if the browser allows it). I would recommend testing in Firefox as it easier to enable the autoplay setting on this browser.
<iframe width="560" height="315" src="https://www.youtube.com/embed/VinOp8dYbhA?controls=0&end=176&autoplay=1" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
As for disabling recommended videos or end cards, this is currently not possible through any API parameters or settings. You may get further insights from the YouTube API team and community. I hope this helps.
Related Content
- 11 months ago
- 2 years ago