javascriptbrowserkiosk

Is there a way to play audio in the browser without being user initiated (for kiosk-like usage)?


I am building a jukebox-like javascript application that runs in the browser. This application will run on a dedicated machine in an exhibition. It will have to run continuously for 8 hours. At certain moments it will navigate to a different page (or reload current page with different search parameters). It needs to play audio on all pages. But audio in the browser can only play user-initiated. Is there a way to bypass the user-initiation requirement in chrome or safari? Again, this will be a dedicated machine, so browser flags etc are an option. If this is not possible in chrome or safari, what would be another solution/environment that can do this?


Solution

  • Your are in total control of the running browser (because you start the kiosk). So you can start the browser without the usual security behavior that prevent auto play. For example if you are using Google chrome you can start it with chrome.exe --autoplay-policy=no-user-gesture-required