Reputation: 15
We've been embedding our live stream using this format URL in an iframe:
https://www.youtube.com/embed/live_stream?channel=[channelid]
It will automatically play the current live stream without needing the specific video id.
But now it says "Video unavailable"
Has Youtube changed anything? Is there any other method to doing this?
Note, we're completely verified for live streaming and embedding, and have made sure our live streams are set to public. We've also tried including various kinds of referrerpolicy in the iframe code. But nothing seems to work.
Upvotes: -1
Views: 980
Reputation: 1
We were having a similar issue where we had an embedded YouTube video for our current live stream and it was showing video unavailable even though we had the enableEmbed set to true.
This issue was fixed for us by changing the YouTube account setting found here: Settings -> Channel -> Advanced Settings Tab -> Do you want to set your channel as made for kids? this needs to be NO otherwise YouTube embedding will not work and will show Video is unavailable. Once this change was made our embedded videos were working as expected for live streaming
Upvotes: 0
Reputation: 11
I was experiencing this too. It appears that YouTube changed this sometime recently and the /embed/live_stream is no longer functioning.
If you happen to be using WordPress this snippet will allow adding a shortcode that queries the YouTube Data API, gets video ID and adds the embed. If the stream is not available a Maintenance message can be shown. By default the video id is cahced in transients for 1 hour unless the stream is not live then it is only cached for 10 minutes. This will reduce number of API calls and speed up the loading for most visitors of the site.
https://github.com/nmbgeek/wordpress-youtube-live-embed
Upvotes: 1