« Back to the HTML Forum

youtube autoplay embed issues

Posted by ciddie0

posted

Forum: HTML Group

any time i use the default youtube embed it works fine but if i want an invisible one for autoplay it doesn't work no matter what i do T_T does anyone know what i can do to fix this?


Report Topic

3 Replies

Sort Replies:

Reply by Arturo

posted

Hey there,

Sometimes the embedded <iframe> doesn't work. Here is a potential solution:

I've attached a currently-working code. You should put this at the top of your file (even outside the <style> tag) so that it works properly (and you can go back and fix quickly should you need to.) Remember to fill in with your own ID and delete the brackets.

Note that the below code works with YT playlists only, but you can obviously add a single song if you just want one. If you don't want this to loop, change loop=1 to loop=0.

Paste the following in your About Me section (Ctrl+C this code then Ctrl+Shift+V):


<iframe width="0" height="0" src="https://www.youtube.com/embed/playlist?list=[your public YT playlist here]&;amp;;autoplay=1&;loop=1&;controls=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" loading="lazy">

</iframe> 


If the above doesn't work, it might be because of rate-limiting (though I'm not a specialist, I just happened to run into the same issue, and it gets resolved after a day or so.) You can test this by replacing it with a different public playlist - it usually works.


Permalink Report Reply

Reply by ciddie0

posted

hiiii! tysm for ur response i'll try it rn and get back to you :DDD


Permalink Report Reply

Reply by ciddie0

posted

sooo i tested it with a different playlist first in the about me section and then the code section but neither worked, T_T if its the rate issue, will it eventually resolve itself?


Permalink Report Reply