mennolui / wp-foyer

Foyer - a free Digital Signage plugin for WordPress. Perfect for theaters, music venues, cinemas and festivals.
GNU General Public License v3.0
51 stars 24 forks source link

Slide with video background and sound enabled not auto played on Chrome #30

Closed shaifeyna56 closed 5 years ago

shaifeyna56 commented 6 years ago

slide with video background not auto played on chromium browser or google chrome .. need to click on the page at browser manually to make the video play..

chromium browser version : 70.0.3538.77 wordpress version : 4.9.7 foyer plugin version : 1.6.0 video fomat tested : mkv mp4

shaifeyna56 commented 6 years ago

found some link from google : https://productforums.google.com/forum/#!topic/chrome/LlaGhkScHls best answer is adding code below after </video> <script> document.getElementById('vid').play(); </script> im not modify your code yet to test

mennolui commented 5 years ago

Hi @shaifeyna56, thanks for the bug report.

Do you mean video backgrounds never play for you? Because video backgrounds still work for me on Chrome 70 / MacOS 10.14.

With the exception of this known issue: #31 (videos not playing when adding them to a display / channel that is already being displayed)

Could you give me as much input as possible, so I can maybe fix this? Eg. steps taken, when do they play and when don't they, what Chrome version / OS version, what happens when using other browsers (Firefox, Safari, Edge) and OS, etc.

shaifeyna56 commented 5 years ago

its google chrome.. I googled and find they told only muted video will autoplay.. with sound will not autoplay.. I tested myself, its autoplay when mute the video if not muted, it not autoplay the video..

mennolui commented 5 years ago

Thanks for troubleshooting this!

Chrome is becoming stricter and stricter when it comes to auto playing videos. Some workarounds (mostly untested so any feedback is appreciated):

  1. Apply a setting to your Chrome browser so it will always allow autoplay.
  2. Mute your video's.
  3. Run Chrome in kiosk mode (not sure how though..).
  4. Use a different browser, for example Firefox.
shaifeyna56 commented 5 years ago

thank you, I just try chrome://flags/#autoplay-policy .. its worked with audio on... yes.. im running it in kiosk mode for display..

mennolui commented 5 years ago

Good to hear it works with that Autoplay policy setting changed!