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
You have exports set in your global scope, which is confusing the Twitch API and setting exports.Twitch rather than window.Twitch
Normally I would say this isn't ReactPlayer's responsibility to fix, but this is a common problem (#846#762#690) and should be quite easy to fix if we just look inside exports as well as window in the getSDK logic.
Players like Vimeo and Twitch have code that will attach the API global on
to `exports` or `module.exports` if it exists, rather than `window`.
This just helps getSDK to look for globals that may have been added there
Fixescookpete/react-player#921
webmiraclepro
added a commit
to webmiraclepro/video-player
that referenced
this issue
Sep 9, 2022
Players like Vimeo and Twitch have code that will attach the API global on
to `exports` or `module.exports` if it exists, rather than `window`.
This just helps getSDK to look for globals that may have been added there
Fixescookpete/react-player#921
Current Behavior
Using version 2.2.0. Videos from Twitch won't play, the following error is printed on the web console:
Uncaught (in promise) TypeError: Cannot read property 'Player' of undefined
The Twitch api file (https://player.twitch.tv/js/embed/v1.js) seems to have loaded correctly.
Expected Behavior
Twitch videos should play normally
Steps to Reproduce
I've got this application which is integrating with react-player 2.2.0
Environment
The text was updated successfully, but these errors were encountered: