Forum Discussion
Autoplay Youtube videos in Storyline
Hi Roneel​,
Happy to help with this!
You're correct. Some web browsers, such as Google Chrome, do not allow audio/video content to autoplay by default. However, you can work around this by updating your iframe URL to include an autoplay parameter:
<iframe width="560" height="315"
src="https://www.youtube.com/embed/3Op4hV4Hkcg?autoplay=1&mute=1&enablejsapi=1"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen>
</iframe>
- autoplay=1 > attempts autoplay
- mute=1 > required for Chrome autoplay compliance (videos must autoplay as muted)
- enablejsapi=1 > needed if you require JavaScript control later.
If you remove mute=1, Chrome will usually block autoplay unless the learner previously interacted with the Slide. Here's an example of the revised iframe URL after publishing to Review 360.
Also, Storyline cannot natively detect when an iframe video finishes and force a Slide to auto-advance. You may be able to configure that behavior with the use of JavaScript. We have a lot of coding gurus here in the community. I'll open the floor so they can share their design suggestions with you!
Related Content
- 1 year ago