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

ReferenceError: self is not defined in @videosdk.live/react-sdk #44

Open
mehrannmminaei opened this issue May 25, 2024 · 4 comments
Open

Comments

@mehrannmminaei
Copy link

mehrannmminaei commented May 25, 2024

in the next js, when I build the app. I get error ReferenceError: self is not defined in @videosdk.live/react-sdk

at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) {

type: 'ReferenceError'

@rajansurani
Copy link
Contributor

@mehrannmminaei Please refer to this example to understand how to use VideoSDK with NextJS.
You will have to wrap your component as dynamic import on client side rendering.
https://github.com/videosdk-live/videosdk-rtc-nextjs-sdk-example

@mehrannmminaei
Copy link
Author

mehrannmminaei commented May 27, 2024

some browsers don't suport self, I changed the self to global, and problem has been resolved . and created a patch for myself.
path--> @videosdk.live/ js-sdk/videosdk.js

@rajansurani
Copy link
Contributor

@mehrannmminaei Can you share the browser details were it was not supported?

@mehrannmminaei
Copy link
Author

mehrannmminaei commented May 27, 2024

To be more precise. The project failed during ‌build. It was written in Google that some browsers do not support it

image

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

2 participants