I’m trying to get a element to autoplay, with sound on, when the HTML loads. I set the autoplay attribute. The videos in question are Youtube embeds and the iframe also has autoplay enabled. I also set up autoplay in the Permissions-Policy headers. For some reason it works on desktop but not mobile. I don’t want the audio muted as this is a music video.
The website is a collection of music videos and the user has a button they can click to enable/disable autoplay. When enabled, when the current video ends they are redirected to a page with the next video. So it’s not intrusive, it’s what they want. But I can’t find a way for mobile videos to actually autoplay it with sound. According to this Google article, it should work via iframe delegation. There’s gotta be away to do this as YouTube does this.
Any help is appreciated!