You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YouTube's live URL format (ex: https://youtube.com/live/AbCdE1Fgh2i) fails the pattern check if you use ReactPlayer.canPlay().
Expected Behavior
ReactPlayer.canPlay("https://youtube.com/live/AbCdE1Fgh2i") should return true
Steps to Reproduce
Pass "https://youtube.com/live/AbCdE1Fgh2i" into ReactPlayer.canPlay(url)
Environment
URL attempting to play: Any YouTube video containing live instead of watch in the URL. This is not my video but an example https://youtube.com/live/WrFhI8AxpOc
Browser: Chrome Version 108.0.5359.98
Operating system: macOS Monterey
Other Information
The product I work on allows users to embed a video into their instance. We use ReactPlayer.canPlay(url) to validate a form field. The form field is showing a validation error anytime someone uses a /live URL.
The text was updated successfully, but these errors were encountered:
canPlay returns false because that URL cannot be played – youtube.com/live URLs are not supported. I’ll see how easy it would be to add support for them.
Should I open a new issue for this bug or it's the same logics?
// The 2 urls target the same videoconsole.log(ReactPlayer.canPlay('https://youtube.com/w/lthffObMcw0'));// falseconsole.log(ReactPlayer.canPlay('https://www.youtube.com/watch?v=lthffObMcw0'));// true
Current Behavior
YouTube's live URL format (ex:
https://youtube.com/live/AbCdE1Fgh2i
) fails the pattern check if you useReactPlayer.canPlay()
.Expected Behavior
ReactPlayer.canPlay("https://youtube.com/live/AbCdE1Fgh2i")
should return trueSteps to Reproduce
Pass
"https://youtube.com/live/AbCdE1Fgh2i"
intoReactPlayer.canPlay(url)
Environment
live
instead ofwatch
in the URL. This is not my video but an examplehttps://youtube.com/live/WrFhI8AxpOc
Other Information
The product I work on allows users to embed a video into their instance. We use
ReactPlayer.canPlay(url)
to validate a form field. The form field is showing a validation error anytime someone uses a/live
URL.The text was updated successfully, but these errors were encountered: