This topic contains 2 replies, has 2 voices, and was last updated by Tim Mustoe 1 year, 7 months ago.
- June 20, 2018 at 5:07 pm #690893
Since Google updated its autoplay policy background video in Chrome will only play if the user “interacts” with it – which kind of ruins the effect.
If the video is muted though, it will play automatically.
The videos I have uploaded to the media library have no audio track, yet Chrome won’t play it on load, which leads me to think that I have to explicitly set it to mute in the code to be recognised as muted by the browser.
But I can’t figure out how to do that in Emmet.
Can anyone help?
Thanks, Tim.June 21, 2018 at 9:50 am #691081
Thank you for reporting this. In order to add needed attribute that indicates that video is muted you should follow the steps below:
– navigate to /wp-content/themes/emmet/sections
– open big_title.php file with file editor
– find the following line
<video id="video_background" preload="none" loop="loop"
– replace that line with one below
<video id="video_background" muted="true" preload="none" loop="loop"
– save changes, clear the cache and try to view your site again.
In case you want to save this change from theme update you can follow these easy steps:
– install Child Theme (note you might need to re-configure some sections of the Front Page after activating Child Theme)
– copy /wp-content/themes/emmet/custom-page.php file
– paste it to /wp-content/themes/emmet-child/ folder
– open this file in text editor, find ‘big_title.php’ text in this file and edit it into e.g. ‘my_big_title.php’ and save the changes.
– after that navigate to /wp-content/themes/emmet/sections/ folder and rename the file big_title.php into my_big_title.php or the name you edited it within custom-page.php file
However we’ll do our best to add this change in one of the next theme updates. Thank you.
JohnJune 22, 2018 at 3:29 pm #691764
Works a charm!
You must be logged in to reply to this topic.