Enable audio autoplay in Chrome for web apps installed on the user's Android desktop

Viewed 1347

I have developed a progressive web app that can be run in kiosk mode / standalone from the user's Android desktop.

On websites, Chrome's Autoplay policy prevents me from playing media programatically if there was no prior user interaction with the website. But this also applies to the PWA. Is there a flag for the manifest or some other solution to allow playback without user gesture in kiosk mode?

(I don't understand why someone wants to prohibit autoplay of media in a PWA that the user has explicitly installed on the desktop.)

2 Answers

Mohre is quite right, autoplay - or in my case creation of audioContext - is allowed without user-gesture when the PWA is installed. However, I believe I've discovered a short-fall in Chrome's Trusted Web Activity implementation ... Since a TWA is a PWA installed from the Play Store, I'd expected the same exemption from the user-gesture rule, but this is not the case. If you list your PWA in the Play Store - by creating and publishing a TWA - user-gesture is once again required :(

Related