Allowing autoplay on Youtube videos in Webviewer?

Hello !

Thanks to the webviewer element, I can display Youtube videos in my app. Theoretically, they should also be played automatically as I added ?autoplay=1 at the end of the URL.

However, when previewing the app on Google Chrome, the video doesn’t play automatically… Upon further investigation, Google Chrome doesn’t allow the autoplay (unless the video is muted). One way to resolve the issue is apparently to add allow='autoplay' as an iframe’s attribute.

The webviewer being basically an iframe, is there a way to add this attribute ? If not, is there a simple solution to allow the autoplay of a Youtube video ?

Thanks in advance ! :slight_smile:

It looks like YouTube has an option for an embedded IFrame player API. You could try adding this code into your Web Viewer component and seeing if that works for the autoplay issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.