« Web, HTML, Tech Forum

AutoPlay with Youtube Videos

Posted by BrandonBurnsRed

posted
updated

Forum: Web, HTML, Tech

Alright so I have been messing around with the autoplay feature and I can confidently say that I got it to work....sometimes. I'm gonna leave my solution here and myabe someone smarter than me can pick it up and fix it further.



Situation: The Youtube video embedded on my profile will auto play sometimes, maybe  every 1/5-7 page loads.



Original embed code:

<iframe width="560" height="315" src="https://www.youtube.com/embed/xqds0B_meys" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>



Solution: add the code "?autoplay=1" after the video url in the code



Fixed Code:

<iframe width="560" height="315" src="https://www.youtube.com/embed/xqds0B_meys?autoplay=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>



Conclusion: I feel as though the handshake between spacehey and embeded videos on Youtube is a bit wonky at the moment. Please feel free to add any thoughts on the matter. I will be publishing results in the coming days should I come across anything.

**EDIT** It seems to be working more consistently now. Still lemme know how it goes for you.


Report Topic

5 Replies

Sort Replies:

Reply by MAD4<3

posted
updated

It dosent autoplay :,c


Report Reply

Reply by BrandonBurnsRed

posted

@MAD4 my bad on the late reply, but sometimes it takes a refresh to get it working.


Report Reply

Reply by BrandonBurnsRed

posted

AYYY @y2K I'm glad to be of service :)


Report Reply

Reply by BrandonBurnsRed

posted

@swirl Are you talking about the video itself? If you can hear the audio but not see the video you have to adjust the video size.


Report Reply

Reply by ✿ Jeannie ✿

posted

Cannot get mine to work at all


Report Reply