3

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 !

Paul
  • 93
  • 2
  • 2
  • 11

2 Answers2

4

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

IvanRF
  • 7,115
  • 5
  • 47
  • 71
  • 1
    I have another question if the channel url is like this for example (www.youtube.com/user/france24english) how can i embed the static live stream ? – Paul May 01 '17 at 14:10
  • 1
    This by itself didn't work for me. Adding allow="autoplay" was necessary, as Havihavi says in another answer. – ijt Aug 04 '20 at 17:14
3

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>
Havihavi
  • 652
  • 1
  • 9
  • 26