Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to embed permanent live url link in youtube #1033

Closed
rajorpratyush opened this issue Sep 28, 2020 · 3 comments
Closed

Not able to embed permanent live url link in youtube #1033

rajorpratyush opened this issue Sep 28, 2020 · 3 comments

Comments

@rajorpratyush
Copy link

Be sure to search for your issue before opening a new one.

Current Behavior

Not able to use permanent live url from youtube i.e https://www.youtube-nocookie.com/embed/live_stream?channel=UC6K7yzj2kV3v3sASdaYCY0Q although i am able to embed the same with iframe

Expected Behavior

I should be able to use permanent live embed

Steps to Reproduce

Just put https://www.youtube-nocookie.com/embed/live_stream?channel=UC6K7yzj2kV3v3sASdaYCY0Q in mediaurl and it will not work but with iframe this works

Environment

Other Information

No

@cookpete cookpete reopened this Nov 30, 2020
@IgnusG
Copy link

IgnusG commented Dec 7, 2020

Not sure if this is related, but I do get an old version of the stream when I enter such URL. It loads fine but displays something different (from the past) than what I would get if I open the url in the browser directly.

Seeing this issue I realize now that what is actually happening is that I'm getting a video instead of the live stream, just like opening the above embed/null opens a rocker launch video whereas the real embed/live_stream opens the livestream.

@IgnusG
Copy link

IgnusG commented Dec 7, 2020

Seems like the JS API does not support these methods. The only solution I found online is from this stackoverflow thread (2017) that suggests creating an iframe with the constructed url and passing that to the YT instance instance instead of an empty div:

https://stackoverflow.com/questions/47241553/youtube-iframe-api-for-live-videos

<iframe id="player" src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID?enablejsapi=1"></iframe>

var player = new YT.Player('player', {});

Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
@luwes luwes closed this as completed Apr 20, 2024
philip-luther added a commit to philip-luther/react-player that referenced this issue Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants