JSMedia sdk is not defined in Nextjs

Description
I have successfully integrated Video SDK in our react js application. I am be join multiple participant with their roles. but sometimes it keep getting error when joining/creating the session. There are two errors below. Do I miss anything ?

Screenshots
1 of 1 unhandled error
Unhandled Runtime Error
ReferenceError: JsMediaSDK_Instance is not defined
Call Stack
Qs.getPTZCapability
node_modules@zoom\videosdk\dist\index.umd.js (1:128428)
L_
node_modules@zoom\videosdk\dist\index.umd.js (1:308924)
N_
node_modules@zoom\videosdk\dist\index.umd.js (1:308724)
node_modules@zoom\videosdk\dist\index.umd.js (1:309621)
eval
t.eval [as project]
node_modules@zoom\videosdk\dist\index.umd.js (1:309913)
t._next
node_modules@zoom\videosdk\dist\index.umd.js (1:43285)
t.next
node_modules@zoom\videosdk\dist\index.umd.js (1:5869)
t._next
node_modules@zoom\videosdk\dist\index.umd.js (1:32203)
t.next
node_modules@zoom\videosdk\dist\index.umd.js (1:586

Device (please complete the following information):

  • Browser: Chrome

Additional context
Add any other context about the problem here.

It looks like you are encountering a runtime error in your React.js application when trying to join or create a session using the Video SDK. The error specifically mentions a ReferenceError stating that JsMediaSDK_Instance is not defined. Here are a few steps you can take to troubleshoot and address the issue:

  1. Check SDK Initialization: Ensure that you have properly initialized the Video SDK in your React.js application. Make sure that the JsMediaSDK_Instance is defined and accessible in the scope where you are using it. Double-check your initialization code and ensure that it is executed before you try to use any Video SDK features.
  2. Verify SDK Version: Check the version of the Video SDK that you have integrated into your application. It’s possible that the version you are using has a bug or compatibility issue. Consider updating to the latest version of the Video SDK to see if the issue persists.
  3. Review Documentation: Go through the Video SDK documentation to make sure you have followed all the necessary steps for integrating the SDK into a React.js application. Check for any specific requirements or configurations that might be missing in your implementation.
  4. Inspect the Call Stack: The call stack in the error message provides information about the sequence of function calls leading to the error. Look at the functions mentioned in the call stack (Qs.getPTZCapability, L_, N_, etc.) to identify where the error is originating. This might give you clues about which part of your code or the Video SDK is causing the issue.
  5. Browser Compatibility:
  6. Network Issues:
  7. Debugging:
    By following these steps, you should be able to identify and address the issue with the JsMediaSDK_Instance not being defined, allowing you to successfully join or create sessions in your React.js application.