Paul
Paul

Reputation: 103

How to control youtube embed live stream?

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 !

Upvotes: 4

Views: 11614

Answers (2)

Havihavi
Havihavi

Reputation: 672

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>

Upvotes: 4

IvanRF
IvanRF

Reputation: 7255

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

Upvotes: 5

Related Questions