Issue
- A video added through the Video URL fragment on a content page (external URL or Document Library URL) configured as follows:
- Muted: false
- Autoplay: true
- Is not autoplaying on first page load/with unauthenticated users.
- Once you interact with the page (by logging in or clicking on the video), the video will reproduce.
Environment
- Liferay DXP 7.4, 7.3, 7.2.
Resolution
- This is due to some web browsers autoplay strict policies: most of them are configured by default to behave like this.
-
This default configuration can in most cases be changed, for example:
- Firefox: https://support.mozilla.org/en-US/kb/block-autoplay#w_always-allow-or-block-media-autoplay
- Microsoft Edge: go to edge://settings/content/mediaAutoplay
- Chrome: https://developer.chrome.com/blog/autoplay/
- A workaround that does not imply changing browsers' configuration would be to mute your video, so that browsers allow the autoplay feature. For example, in Chrome:
-
-
Chrome's autoplay policies are simple:
- Muted autoplay is always allowed.
- {...}
-
- So your fragment configuration must look like this:
- Muted: true
- Autoplay: true
-