react-native-youtube-iframe icon indicating copy to clipboard operation
react-native-youtube-iframe copied to clipboard

any plan of supporting live streaming, using CHANNEL_ID

Open sheshnathiicmr opened this issue 4 years ago • 8 comments

First of all thanks for the wonderful library, any near future plan to support live streaming using channel-id?

kind of <iframe type="text/html" width="854" height="480" src="https://www.youtube.com/embed/live_stream?channel=[CHANNEL_ID]&autoplay=1"></iframe>

or even direct URL will work too like: https://www.youtube.com/user/NASAtelevision/live, so exposing option to supply direct URL instead of expecting videoID can help

sheshnathiicmr avatar Jun 11 '20 17:06 sheshnathiicmr

Hi @sheshnathiicmr! This is definitely something I'm looking at! Although cannot give you a timeline on when I can push a stable release with this feature. PRs are welcome tho :)

LonelyCpp avatar Jun 11 '20 18:06 LonelyCpp

BTW, live videos work perfectly fine with their videoIds.

eg: https://www.youtube.com/user/NASAtelevision/live has nA9UZF-SZoQ as it's video ID. If you try it with the react-native-youtube-iframe component, it renders the live video as expected

LonelyCpp avatar Jun 11 '20 19:06 LonelyCpp

right @LonelyCpp using video id it works like a charm, but video id is subject to change, i have not observed personally, but some people have mentioned about this on SO

https://stackoverflow.com/questions/46783380/youtube-video-id-change-after-some-time https://stackoverflow.com/questions/39204757/youtube-live-streaming-embed-code-keeps-changing

sheshnathiicmr avatar Jun 12 '20 03:06 sheshnathiicmr

I would also love to see this enhancement, ill be adding this to a work project soon and we use youtube extensively to serve our content. Heavy live stream user as well.

ZhymonNorman avatar Jun 17 '20 14:06 ZhymonNorman

first of all thanks a lot for this API . It works really awesome ...I am also eagerly waiting for the live stream by passing the channel id

AravindPrabhu avatar Jun 18 '20 14:06 AravindPrabhu

Hi @LonelyCpp , is there an ongoing implementation for this already? We might need the functionality for a particular project so I'm thinking of starting a pull request for it.

Edit: I also want to know if you already have an idea of how to implement it.

polcats avatar Aug 31 '20 04:08 polcats

@polcats Haven't written any code yet on this. The iframe API does not support live links with channel IDs yet and there seems to be no documentation about it :(

Something like

<iframe width="560" height="315" src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID&autoplay=1" frameborder="0" allowfullscreen></iframe>

allows embedding a live video but I'm not sure if it gives us access to player functions through javascript.

LonelyCpp avatar Sep 01 '20 05:09 LonelyCpp

@LonelyCpp Yep, I also studied the code and found out that the youtube API itself does not support a Livestream link. A workaround I did for a POC was to fetch the videoId of a Livestream using the youtube search API. But I don't think it's feasible since the free search is limited to 100x per day. And paying for it is kinda out of the question.

polcats avatar Sep 01 '20 09:09 polcats