poyzee.blogg.se

Chrome autoplay video stack overflow
Chrome autoplay video stack overflow





chrome autoplay video stack overflow

That's why all browser vendors prevent websites from playing audio unless the user interacts with them. This is even worse if they opened multiple tabs and are not sure which one is responsible.

#CHROME AUTOPLAY VIDEO STACK OVERFLOW FULL#

They get really angry when they load a website, and an audio advertisement blares at them at full volume. There is a good reason for this precaution: Users usually don't expect audio from websites. Otherwise, I can try loading the game engine for the login page and playing thru canvas audio. Workarounds I've tried are to have an autoclick event happen, or autoreloading the page if it's their first time.

chrome autoplay video stack overflow

Wondering if there's a solid workaround for this as not autoplaying the login splash soundtrack will be odd and ruin the user gaming experience. Mousemove no longer counts as "an event" or "interaction".

  • On mobile, the user has added the site to his or her home screen.
  • On desktop, the user's Media Engagement Index threshold has been crossed, meaning the user has previously play video with sound.
  • User has interacted with the domain (click, tap, etc.).
  • Google states: Autoplay with sound is allowed if: Login.html:72 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. The game will most likely be played on Chrome, but with the latest Chrome 66 update, you cannot autoplay music until someone "interacts" with the page: This page has no need to load the game engine or game scripts. Before I load the game, I have a simple pre-login page with a Splash and background music. I'm creating an HTML5 game using MelonJS game engine.







    Chrome autoplay video stack overflow