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.
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.
Since April 2018, Google made some changes to the Autoplay Policy. You not only need to add the autoplay=1 as a query param, but also add allow='autoplay' as an iframe's attribute
So while embed youtube video, you will have to do something like this:
2 Replies
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.
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.
Since April 2018, Google made some changes to the Autoplay Policy. You not only need to add the autoplay=1 as a query param, but also add allow='autoplay' as an iframe's attribute
So while embed youtube video, you will have to do something like this:
<iframe src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1" allow='autoplay'></iframe>