« Back to the HTML Forum

how do I auto play music??

Posted by s4mmy

posted

Forum: HTML Group

idk bro I just rlly wanna auto play frank sinatra :p


Report Topic

3 Replies

Sort Replies:

Reply by vogel

posted

SpaceHey won't let me comment the code so here. Replace YOUTUBEID with your YT video ID from the video link and throw that code somewhere in your about me, either the very start or the very end, not with the rest of your code. If you need you can give me a video url and I'll give you the ID


Permalink Report Reply

Reply by JaecadeJnight

posted

Put the autoplay attribute on whatever media elements you want in your code. For instance, this code autoplays a cute kitty:


<video width="400" controls>

  <source src="https://amp.dev/static/inline-examples/videos/kitten-playing.mp4" type="video/mp4">

</video>


Permalink Report Reply

Reply by asking_alessandria

posted

this is the code I have! (it hides the music player)

Replace link with the URL of the YouTube video (the numbers n letters)


<iframe width="0" height="0" src="https://www.youtube.com/embed/LINK?loop=1&autoplay=1&controls=0&start=0&playlist=LINK&”title=" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="””">

</iframe>


Permalink Report Reply