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

React-Player giving error #1721

Closed
Ayush-Vish opened this issue Dec 16, 2023 · 10 comments · Fixed by #1722
Closed

React-Player giving error #1721

Ayush-Vish opened this issue Dec 16, 2023 · 10 comments · Fixed by #1722

Comments

@Ayush-Vish
Copy link

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

Current Behavior

Screenshot from 2023-12-16 17-16-05
Screenshot from 2023-12-16 17-15-58

Expected Behavior

As Expected

Steps to Reproduce

  1. Install react-player
  2. Get current stream of your device

Environment

Other Information

Screenshot from 2023-12-16 17-15-58

@luwes
Copy link
Collaborator

luwes commented Dec 16, 2023

could you provide a code sandbox please? does it happen with version 2.13.0? thanks

@wienans
Copy link

wienans commented Dec 16, 2023

I have the same problem. with 2.13.0 this error does not happen.

@Ayush-Vish
Copy link
Author

could you provide a code sandbox please? does it happen with version 2.13.0? thanks

https://codesandbox.io/p/github/Ayush-Vish/React-player-reop/main?layout=%257B%2522sidebarPanel%2522%253A%2522GIT%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clq878azx00072v6hf7oucrjc%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clq878azx00022v6h0zs9j2a3%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clq878azx00042v6ho3o8ftpk%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clq878azx00062v6hsci9sldx%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clq878azx00022v6h0zs9j2a3%2522%253A%257B%2522id%2522%253A%2522clq878azx00022v6h0zs9j2a3%2522%252C%2522activeTabId%2522%253A%2522clq87g0ru00wf2v6h8w9dy9m4%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252F.codesandbox%252Ftasks.json%2522%252C%2522id%2522%253A%2522clq87d1f200qg2v6huezfwezr%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522clq87g0ru00wf2v6h8w9dy9m4%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A6%252C%2522startColumn%2522%253A3%252C%2522endLineNumber%2522%253A6%252C%2522endColumn%2522%253A3%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252Fmain.jsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%257D%252C%2522clq878azx00062v6hsci9sldx%2522%253A%257B%2522id%2522%253A%2522clq878azx00062v6hsci9sldx%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clq878azx00052v6h9e0c293o%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A5173%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clq878azx00052v6h9e0c293o%2522%257D%252C%2522clq878azx00042v6ho3o8ftpk%2522%253A%257B%2522id%2522%253A%2522clq878azx00042v6ho3o8ftpk%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clq878azx00032v6hxbrtlh5d%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522CSB_RUN_OUTSIDE_CONTAINER%253D1%2520devcontainer%2520templates%2520apply%2520--template-id%2520%255C%2522ghcr.io%252Fdevcontainers%252Ftemplates%252Fjavascript-node%255C%2522%2520--template-args%2520%27%257B%257D%27%2520--features%2520%27%255B%255D%27%2522%252C%2522id%2522%253A%2522clq8794ue008y2v6huhf3lzly%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clq8794ue008y2v6huhf3lzly%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

@e-senturk
Copy link

same here

@alessandroliveri
Copy link

Are you using vitejs?
I had a similar problem and it was because of this: it seems that the in the last version they changed the way to build the lib
https://github.com/cookpete/react-player/pull/1684/files#diff-2335f0629f815783228d4700c3f0e94714231fded522e18930aeebc38d39434f

so now lazy mode is used by default

@Ayush-Vish
Copy link
Author

Are you using vitejs? I had a similar problem and it was because of this: it seems that the in the last version they changed the way to build the lib https://github.com/cookpete/react-player/pull/1684/files#diff-2335f0629f815783228d4700c3f0e94714231fded522e18930aeebc38d39434f

so now lazy mode is used by default
Yupp I'm using react + vite + ts

@ggiak
Copy link

ggiak commented Dec 18, 2023

same here.

@luwes
Copy link
Collaborator

luwes commented Dec 18, 2023

looking into this bug. the dynamic imports should change to require's I think. not sure esbuild does this by default.

@luwes
Copy link
Collaborator

luwes commented Dec 19, 2023

the normal case should be fixed in 2.14.1
https://codesandbox.io/p/github/Ayush-Vish/React-player-reop/csb-smgw3m/draft/frosty-dew?file=%2Fpackage.json%3A15%2C30

@e-senturk
Copy link

I can confirm that its solved on 2.14.1 on my side. Thank you for the contribution.

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

Successfully merging a pull request may close this issue.

6 participants