react-native-youtube-iframe
react-native-youtube-iframe copied to clipboard
any plan of supporting live streaming, using CHANNEL_ID
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
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 :)
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
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
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.
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
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 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 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.