How to control youtube embed live stream?

11.1k views Asked by At

I have just learned that YouTube live stream URL is randomly changing. I found this on stackoverflow "YouTube Live Streaming embed code keeps changing" so I know the the static embed link is this https://www.youtube.com/embed/live_stream?channel=[channel ID]

What I would like know is how to add autoplay=1 to the embed link and any other functions like this.

30/7/2017 Update - this method does not work on ios V10.3.3 tested on an iPhone 6+ the player crashes safari and chrome !

2

There are 2 answers

2
IvanRF On BEST ANSWER

It's really simple, just add the parameter autoplay=1 at the end:

https://www.youtube.com/embed/live_stream?channel=[channel ID]&autoplay=1

2
Havihavi On

allow autoplay and add it to the end of the embed src.

 <iframe width="560" height="315" src="https://www.youtube.com/embed/ldy3VEPIRk0?autoplay=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>