Ask coding questions

← Back to all posts
How to autoplay a YouTube video? (HTML)
QuantumCodes (25)

I was trying to make a website to prqnk everyone(-if u run and see thumbnail, im sure you will know)

I am not able to make that video to autoplay. Is it even possible? A code provided with answer will be appreciated. Even if it is muted, i want it to autoplay...

Comments
hotnewtop
InvisibleOne (3228)

I think that you need to add "&autoplay=1" to the end of your URL and allow="autoplay;" inside your iframe.

QuantumCodes (25)

@InvisibleOne not working... can u give a sample code? Or try it

QuestionableNS (1)

google said: "To make an embedded video autoplay, add "&autoplay=1" to the video's embed code right after the video ID (the series of letters that follows "embed/")."

QuantumCodes (25)

@QuestionableNS still didnt work and.. whats this name entity?

QuestionableNS (1)

@QuantumCodes i just tested it and for some reason it does not auto play

QuantumCodes (25)

@QuestionableNS thats the problem i have. Somewhere jt said you need to put &autoplay=1&mute=1 but that also doesnt work :( i am using %26 to remove name entity error