# MeteorJS Zoom Web SDK

**URL:** <https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947>\
**Category:** Web\
**Created:** [April 27, 2021, 8:18am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947 "2021-04-27T08:18:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [April 27, 2021, 8:18am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/1 "2021-04-27T08:18:07Z")

</div>

**Description**  
I am trying to integrate Zoom Web SDK to MeteorJS React  
I was able to run the sample web app react from zoom.  
However when I tried it on the MeteorJS React. I am now getting a  
JS Media SDK Not Defined Error

**Error**  
Uncaught ReferenceError: JsMediaSDK\_Instance is not defined

**Which Web Client SDK version?**  
“@zoomus/websdk”: “^1.9.1”,

**Screenshots**

 ![Screenshot from 2021-04-27 15-42-13](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/7/87dfec05e6112b5cc6c62cecc50bc22fe740bf55.png)

**Device (please complete the following information):**

- Device: PC
- OS: Ubuntu 18.04
- Browser: Chrome
- Browser Version: Chrome/89.0.4389.90

**Additional context**

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [April 28, 2021, 9:48pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/2 "2021-04-28T21:48:38Z")

</div>

Hey @tepx24,

Thank you for reaching out to the Zoom Developer Forum. It was really helpful to see your codebase, I think I was able to spot the issue.

It looks like you are importing the [Web SDK](https://marketplace.zoom.us/docs/sdk/native-sdks/web#zoom-web-sdk) both via your [package.json](https://github.com/tepxgit/meteorjszoom/blob/50c0bd55cf4a442a9f282eed98a3d3aa8f179309/package.json#L12) file as well as in your [main.html](https://github.com/tepxgit/meteorjszoom/blob/50c0bd55cf4a442a9f282eed98a3d3aa8f179309/client/main.html#L34-L39) file. This means that you are importing the SDK using both the [Local Method](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build#option-1-import-module-locally) and the [CDN Method](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build#option-2-import-through-cdn).

With any app, you’ll want to choose one method to import the dependencies. When it comes to React apps, we found that it’s easiest to import dependencies using the CDN method. We have an example of this in the [Sample React App](https://github.com/zoom/websdk-sample-react/tree/master/src):

> <https://github.com/zoom/websdk-sample-react/blob/1adb9494c1ed6c529d52dfd9641a97160539a71d/public/index.html#L29-L30>

> <https://github.com/zoom/websdk-sample-react/blob/1adb9494c1ed6c529d52dfd9641a97160539a71d/public/index.html#L36-L41>

I hope that helps! Let me know if you have any questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [May 3, 2021, 11:18am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/3 "2021-05-03T11:18:13Z")

</div>

Hi Max,

Thanks for the reply. I followed your suggestion and remove the local/package.json zoom web sdk. I imported the Zoom Web SDK dependencies as CDN. however I am still getting the same JSMediaSDK\_not defined error. I have updated the git repo.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 5, 2021, 12:48am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/4 "2021-05-05T00:48:11Z")

</div>

Hey @tepx24,

Thank you for making that change! Looking at the updated repo, I’m seeing that your public folder still has local Zoom Web SDK files in there. I think your bundler might still be including those files which is causing the conflict we’re seeing here.

When you then prepare dependencies, it is then referring to another instance of the ZoomMtg object:

> <https://github.com/tepxgit/meteorjszoom/blob/eb860d171c6419148d83694500a742030a6a39c0/imports/ui/App.jsx#L10-L12>

In our Sample App, it looks like we needed to declare ZoomMtg as a variable when using the CDN Method:

> <https://github.com/zoom/websdk-sample-react/blob/1adb9494c1ed6c529d52dfd9641a97160539a71d/src/App.js#L3-L8>

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [May 5, 2021, 2:29am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/5 "2021-05-05T02:29:37Z")

</div>

Hi Max,

Thanks for the help.  
I have updated the git repo and removed the local zoom files in the public folder. however I am still getting the same JSMediaSDK not defined error. when I try to declare var ZoomMtg. I am getting a Uncaught TypeError: Cannot read property ‘setZoomJSLib’ of undefined

also Im not sure if this is an issue but im getting some console messages about samesite cookies.

 ![Screenshot from 2021-05-05 10-27-52](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/d/ad734a8ec55a5ba87e4f8a7c6863fe71f35f496b.png)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 6, 2021, 12:26am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/6 "2021-05-06T00:26:29Z")

</div>

Hey @tepx24,

Thanks for testing that out! I’m not sure what the issue is here, I’ll consult my team to see if they are able to offer any insight and get back to you here.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 6, 2021, 9:26pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/7 "2021-05-06T21:26:59Z")

</div>

Hey @tepx24 ,

> [@tepx24](#):
>
> I am still getting the same JSMediaSDK not defined error. when I try to declare var ZoomMtg. I am getting a Uncaught TypeError: Cannot read property ‘setZoomJSLib’ of undefined

This means that `ZoomMtg` is not defined in the window of your application.

I am not familiar with MeteorJS, but you will need to define `ZoomMtg` in your window

> <https://stackoverflow.com/questions/27509125/global-variables-in-meteor/27510156#27510156>

Examples using React or Vue sample apps:

> <https://github.com/zoom/meetingsdk-react-sample/blob/master/src/App.js#L3>

OR

> <https://github.com/zoom/meetingsdk-vuejs-sample/blob/master/src/main.js#L6>

Let me know if that helps! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [May 10, 2021, 2:20am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/8 "2021-05-10T02:20:23Z")

</div>

Hi Tommy,

Thanks for helping out.

I declared zoom using `let ZoomMtg = window.ZoomMtg;`

while I can see the I can get connected to the Zoom meeting, the JSMediaSDK still not being loaded  
and Im only getting a black screen. which is the JSMediaSDK not defined error.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 10, 2021, 4:14pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/9 "2021-05-10T16:14:22Z")

</div>

Hey @tepx24 ,

Can you share a screenshot of the new issue? Make sure to include any errors in the browser console.

-Tommy

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [May 12, 2021, 12:49am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/10 "2021-05-12T00:49:47Z")

</div>

Hi Tommy,

Here is the screenshot of the errors.

 ![Screenshot from 2021-05-12 08-48-01](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/3/53a53fcad787de03c0773e0ac57c90ada6d056dd.png)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 12, 2021, 11:41pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/11 "2021-05-12T23:41:39Z")

</div>

Hey @tepx24,

Would you be able to update the Git repo with your latest changes? I’m going to investigate this further on my end.

Also, I sent you a PM regarding the repo that is fairly urgent. Please check your messages on the developer forum.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [May 14, 2021, 2:36am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/12 "2021-05-14T02:36:07Z")

</div>

Hi Max

I have updated the git repo. I have also did the change about your message regarding the git repo.

Please do investigate.

Very much appreciate the help.

Thanks,  
tepx24

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 14, 2021, 4:13pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/13 "2021-05-14T16:13:21Z")

</div>

Thanks @tepx24 ,

Can you add a README.md to your repo with instructions on how to run your application so we can debug it? 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [May 17, 2021, 2:19am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/14 "2021-05-17T02:19:32Z")

</div>

Hi Tommy,

I have updated the repo and added a README.md

Kindly check if you can help me debug it.

Thanks.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 18, 2021, 12:31am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/15 "2021-05-18T00:31:09Z")

</div>

Hey @tepx24,

Thank you, I’ll look into this further and get back to you tomorrow.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [May 19, 2021, 6:22pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/16 "2021-05-19T18:22:44Z")

</div>

Hey @tepx24,

Sorry for the delay, I appreciate your patience. After looking into this and running the app on my end, I wasn’t able to make any changes to get this working.

I’ll work with internal resources to see if we can offer any further advice and then update you here.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![tepx24](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tepx24/32/26396_2.png) [@tepx24](https://devforum.zoom.us/u/tepx24)\
**Post date:** [June 7, 2021, 2:00am UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/17 "2021-06-07T02:00:14Z")

</div>

Hi Max,

Is there any further advice that you can share regarding the issue?

Thanks.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 7, 2021, 10:32pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/18 "2021-06-07T22:32:23Z")

</div>

Hey @tepx24,

Sorry for the delay there, I appreciate your patience here. I don’t have any tips to share with you so far.

I don’t see anything you’re doing wrong here so my next steps are to build out a MeteorJS application and test this from the ground up myself but I haven’t had a chance to that just yet.

I’ll set another reminder for this and update you as soon as I get the chance.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![SigmaNursing](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@SigmaNursing](https://devforum.zoom.us/u/SigmaNursing)\
**Post date:** [July 1, 2021, 5:18pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/19 "2021-07-01T17:18:52Z")

</div>

FWIW I’m running into this as well. I am developing an application that is loading ZoomMtg after page load. `window.ZoomMtg` exists, and when I click the “Join” button, I get the errors. I’m debugging like crazy, but it would help to see the source of the zoom meeting js file.

Why all the reliance on globals?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [July 2, 2021, 9:47pm UTC](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947/20 "2021-07-02T21:47:52Z")

</div>

Hey @SigmaNursing,

Unfortunately, I can’t speak to why/how the minified JS is built we unfortunately aren’t able to provide direct source code. If you’re encountering issues, please submit a new forum topic and I’ll follow up with you there.

@tepx24 In my testing, I wasn’t able to get the SDK working with MeteorJS which doesn’t mean it isn’t possible but I didn’t find a way. My apologies for not being of more assistance here.

Thanks,  
Max

[Next page](https://devforum.zoom.us/t/meteorjs-zoom-web-sdk/48947.md?page=2)
