YouTube videos don't autoplay
Nexuist opened this issue · 7 comments
Every other type of media seems to work fine, but YouTube embeds do not automatically autoplay even though they have the &autoplay=1
parameter at the end. This may require rewriting the frontend to use the YouTube API rather than an iframe, or maybe I'm just missing something obvious.
Any help would be appreciated!
https://stackoverflow.com/questions/51230411/youtube-embedded-video-autoplay
By default, the browser will block the autoplay of sound video. The trade-off is we need to set mute=1, but then we can not hear the sound.
This will make it autoplay-able, but no sound
If that's okay with you, I'll create a pull request on this?
Is this issue still open? If so, I would like to have a go at it 😃
Hey @sparkle-sparkle - if you can figure out a way to get these to autoplay without being muted, that would be awesome! If not, ideally there would be some sort of way to inform the user that they have to manually unmute the video, maybe as a label underneath the video as there currently is to link to the original source.
@conanak99 thank you for the PR! Can you confirm that if you unmute the video once it stays unmuted for every other YouTube video after it? I’m on mobile right now so I can’t test until I get home. Thanks!
I have found something that may help, but I cannot find a way to locally run the app. How can I run it locally?
@sparkle-sparkle - are you encountering any specific error? The app should be able to run fine locally - just open index.html and start playing with it. Don’t mind the backend stuff; that’s all hosted on AWS and shouldn’t need to be changed.
I do notice that there are variables being used in the URL to youtube and I am wondering if that is getting in the way?
I have pulled from upstream and the videos autoplay when I open index.html in the browser. I do not have to press space or anything, just open index.html in the browser.
Is this still an open issue?