#96320YouTube Autoplay is not working in Chrome
Description
Hi,
Chrome does not allow autoplay of YouTube videos if mute option is not set.
https://developer.chrome.com/blog/autoplay/
This can be fixed by providing the mute option if autoplay is set.
/sysext/core/Classes/Resource/Rendering/YouTubeRenderer.php
Line 149
Change:
if (!empty($options[‘autoplay’])) {
$urlParams[] = ‘autoplay=1’;
}
To:
if (!empty($options[‘autoplay’])) {
$urlParams[] = ‘autoplay=1’;
$urlParams[] = ‘mute=1’;
}
Thanks
Reviews 5
- 11.5 77432[BUGFIX] Mute autoplayed videos
- main 77288[BUGFIX] Mute autoplayed videos
- 10.4 72846[BUGFIX] Set mute=1 if autoplay=1 for rendering youtube videos
- 11.5 72845[BUGFIX] Set mute=1 if autoplay=1 for rendering youtube videos
- main 72621[BUGFIX] Set mute=1 if autoplay=1 for rendering youtube videos