While it is possible to use youtube.com/live_stream?channel=channel-id/ with amp-youtube, this URL will only display live events, and not scheduled streams. This means that going to the URL could display "stream offline" while a scheduled stream was playing on that channel.
However, there is also youtube.com/c/channel-name/live, which should go to both scheduled streams or live events, or just the user's videos if there is no current stream, but there's no way to implement that into amp-youtube.
Sorry if this is the wrong place to post this.
@csculley From what I can find, YouTube Live Videos get their own VideoId (https://www.youtube.com/watch?v=s8SwlaqDrdM) which should be embedable via amp-youtube. Is what you have in mind a different case @csculley ?
@csculley please see previous comment. Closing the issue, please feel free to reopen if previous answer is not satisfactory.
Verified this works: https://codepen.io/aghassemi/pen/PJrpvd?editors=1000
Yeah, what I was looking for would have to be implemented by youtube itself. Thanks anyways!
Hello @aghassemi, I'm trying to use the static live streaming URL of our youtube channel with amp-youtube, but it is not working.
I've tried to use it with the following formats, but none has worked:
youtube.com/live_stream?channel=UCqFCFEIqqh35HXvkl58CERwlive_stream?channel=UCqFCFEIqqh35HXvkl58CERwalaantube/liveI know that I can use the video id, but it keeps changing from time to time.
Now we are using the amp-iframe, but the autoplay option is not working even if you pass it as a parameter in the URL autoplay=1.
Is it currently possible to use amp-youtube with live stream static URLs or not? and if not, is it planned to?
One more note that could help:
When I set the video id to live_stream?channel=UCqFCFEIqqh35HXvkl58CERw, the generated iframe URL inside the amp-youtube tag was:
https://www.youtube.com/embed/live_stream%3Fchannel%3DUCqFCFEIqqh35HXvkl58CERw?enablejsapi=1&playsinline=1&iv_load_policy=3
There are 2 problems with this URL:
? and = to be %3F and %3D? here:live_stream?...?enablejsapi=1...See:
https://www.youtube.com/embed/live_stream__%3F__channel__%3D__UCqFCFEIqqh35HXvkl58CERw__?__enablejsapi=1&playsinline=1&iv_load_policy=3
This URL could work if:
& after the provided URL to overcome the problem of duplicated ?The final URL will be something like this:
https://www.youtube.com/embed/live_stream__?__channel__=__UCqFCFEIqqh35HXvkl58CERw__&?__enablejsapi=1&playsinline=1&iv_load_policy=3
@abazeed you are right livestream channels is not supported yet. Reopening the issue.
regarding autoplay with iframe, YT does not support it natively yet on mobile, only AMP does.
/cc @cathyxz let's add a new attribute data-live-channelid that can be specified instead of data-videoid. We would need to change the validation rules so that either of data-videoid , data-live-channelid become required now. The placeholder poster image logic may need to chaneg as well. Not sure if YT provides default poster for live channels or not.
@abazeed As a side note, I was implementing static live stream values before this change with data-videoid="live_stream" data-param-channel="channelid"
The original issue I had with youtube (which I mistakenly opened as an issue with AMP) is that while one can go to https://www.youtube.com/embed/live_stream?channel=UCzZe-zMu-YgVFQfDmsFG_VQ, the link will show the live stream as "offline", even though the https://www.youtube.com/channel/UCzZe-zMu-YgVFQfDmsFG_VQ channel page shows that they are currently live. This is because youtube separates their "stream now" livestreams, and their scheduled streams into two different systems. I've asked on Reddit https://www.reddit.com/r/youtubegaming/comments/79xzt8/youtube_live_improvements_making_live_events_even/dpllmbg/, and they seem to be planning on merging these two systems together in the future, although I'm not sure on the timeline of this happening.
I'm glad my mistaken issue led to a beneficial change!
Most helpful comment
@abazeed As a side note, I was implementing static live stream values before this change with
data-videoid="live_stream" data-param-channel="channelid"The original issue I had with youtube (which I mistakenly opened as an issue with AMP) is that while one can go to https://www.youtube.com/embed/live_stream?channel=UCzZe-zMu-YgVFQfDmsFG_VQ, the link will show the live stream as "offline", even though the https://www.youtube.com/channel/UCzZe-zMu-YgVFQfDmsFG_VQ channel page shows that they are currently live. This is because youtube separates their "stream now" livestreams, and their scheduled streams into two different systems. I've asked on Reddit https://www.reddit.com/r/youtubegaming/comments/79xzt8/youtube_live_improvements_making_live_events_even/dpllmbg/, and they seem to be planning on merging these two systems together in the future, although I'm not sure on the timeline of this happening.
I'm glad my mistaken issue led to a beneficial change!