# I get a black screen when just importing ZoomMtg from @zoomus/websdk

**URL:** <https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663>\
**Category:** Web\
**Created:** [December 17, 2020, 4:47pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663 "2020-12-17T16:47:23Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [December 17, 2020, 4:47pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/1 "2020-12-17T16:47:23Z")

</div>

**Description**  
Hello Everyone,

I’am using Zoomus/websdk in my app and when I just import ZoomMtg from @zoomus/websdk I get a black screen on my entire application not only the page where I did the import.

I added this in index.html:

```
<link type="text/css" rel="stylesheet" href="node_modules/@zoomus/websdk/dist/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="node_modules/@zoomus/websdk/dist/css/react-select.css" />
<script src="https://source.zoom.us/1.8.0/lib/vendor/jquery.min.js"></script>

```

**Error**  
There is no error just black screen.

**Which version?**  
Sdk version 1.8.0 and 1.8.3

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

- Device: PC
- OS: Ubuntu 20.04
- Browser: Chrome and Firefox

Thank you a lot for your help.

---

<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:** [December 17, 2020, 5:56pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/2 "2020-12-17T17:56:06Z")

</div>

Hey @pvkndux,

To fix the black screen issue on the Client Web SDK follow the steps outlined below:

1. Make sure the the [latest Web SDK version](https://www.npmjs.com/package/@zoomus/websdk) is being used.
2. Upon initial import of the Client Web SDK, there may be just a black screen. This is expected until you join a meeting or webinar. As a solution, you can hide the Client Web SDK by default ([example](https://github.com/zoom/websdk-sample-angular/blob/master/src/styles.css#L7)), and then show it when the Start / Join Meeting / Webinar flow has been started ([example](https://github.com/zoom/websdk-sample-angular/blob/master/src/app/app.component.ts#L53)).
3. If the Web SDK is just a black screen joining / starting Meetings / Webinars is not working, check to see if there are errors in the browser console. If there are errors, fix them. If they cannot be fixed, let us know.

By the way, are you using Angular or React or another frontend framework?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [December 17, 2020, 8:16pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/3 "2020-12-17T20:16:11Z")

</div>

Hello @tommy,

Thank you a lot for your reply,  
I will do your solutions and we’ll be back to you.  
I am using React.

Thank you again

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [December 17, 2020, 9:07pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/4 "2020-12-17T21:07:44Z")

</div>

Hello @tommy,

I tried your solution it works but I don’t know why but my page cannot scroll to the footer,  
it is blocked on fixed height.

Do you have an idea ?

Thank you again.

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [December 18, 2020, 6:41pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/5 "2020-12-18T18:41:59Z")

</div>

Hello @tommy again,

I finally find a solution:  
I import my ZoomMtg component only in useEffect of the concern component.

Thank you a lot.

---

<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:** [December 21, 2020, 7:18pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/6 "2020-12-21T19:18:38Z")

</div>

Happy to hear you got it sorted out! 🙂

Let us know if you have any other questions!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![irahul8595](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/irahul8595/32/20454_2.png) [@irahul8595](https://devforum.zoom.us/u/irahul8595)\
**Post date:** [December 23, 2020, 3:23pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/7 "2020-12-23T15:23:21Z")

</div>

Hello @tommy and @pvkndux can you please help me out…my zoom is running good on specific page…but when I switch to another page it is showing black screen on whole window on every page… when i remove "import { ZoomMtg } from “@zoomus/websdk” "  
this line then project is working fine all pages are visible but that time zoom is not working… so how to solve this black screen problem.

 ![signin](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/2/c229f11c4f6a07ee4fe01a7bb4e0d92c40cc225a.jpeg) ![meeting](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/b/abea57586d59721bdaae36f149e6cc6f45202a6a.jpeg)

---

<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:** [December 28, 2020, 5:45pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/8 "2020-12-28T17:45:12Z")

</div>

Hey @irahul8595,

Since the original issue in this topic is solved, please create a new topic: #client-web-sdk and fill out the post template so we have enough info to help! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [December 28, 2020, 6:51pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/9 "2020-12-28T18:51:46Z")

</div>

Hello @irahul8595,

For the black screen problem, the solution I found is to import zoomMtg in your componentDidMount (or useEffet for hooks ) so it concern only the current page.

Let me know if this solve your problem

---

<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:** [December 29, 2020, 5:25pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/10 "2020-12-29T17:25:11Z")

</div>

Thanks for sharing @pvkndux! 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [December 29, 2020, 7:15pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/11 "2020-12-29T19:15:32Z")

</div>

You’re Welcome @tommy 😉

---

<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:** [December 29, 2020, 10:13pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/12 "2020-12-29T22:13:07Z")

</div>

Feel free to reach out if you run into any other issues!

-Tommy

---

<div class="post-metadata">

**Author:** ![irahul8595](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/irahul8595/32/20454_2.png) [@irahul8595](https://devforum.zoom.us/u/irahul8595)\
**Post date:** [January 17, 2021, 5:25pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/13 "2021-01-17T17:25:07Z")

</div>

Hello @pvkndux ,

I am really very sorry for I was shifted to other urgent project…Thanks for your reply.  
I tried to add import zoomMtg in useEffect but i got the error. Please tell me where I is the issue.

 ![ZoomErr](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/b/dbd61e39d21ec817cc78705e322ba45578813c8e.png)

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [January 17, 2021, 7:21pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/14 "2021-01-17T19:21:22Z")

</div>

Hello @irahul8595 ,

For the import use instead `const { ZoomMtg } = require('@zoomus/websdk')`.  
Because we cannot use the `import` statement inside the class or function.

Hope this will help you.

---

<div class="post-metadata">

**Author:** ![irahul8595](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/irahul8595/32/20454_2.png) [@irahul8595](https://devforum.zoom.us/u/irahul8595)\
**Post date:** [January 18, 2021, 1:12pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/15 "2021-01-18T13:12:02Z")

</div>

Hello @pvkndux ,

Thank you so much. Its working now. 🤩  
`const { ZoomMtg } = require('@zoomus/websdk')`.–\> This is very helpful, thanks for sharing this. 😇

---

<div class="post-metadata">

**Author:** ![pvkndux](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pvkndux/32/20293_2.png) [@pvkndux](https://devforum.zoom.us/u/pvkndux)\
**Post date:** [January 18, 2021, 1:33pm UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/16 "2021-01-18T13:33:03Z")

</div>

Hello @irahul8595 ,

You’re welcome. 😉 I am glad it helped.

---

<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:** [January 20, 2021, 1:09am UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/17 "2021-01-20T01:09:44Z")

</div>

Hey @pvkndux and @irahul8595,

Thank you for the assistance there @pvkndux! I’m glad to hear that resolved your issue @irahul8595. Let us know if you have any other questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 19, 2021, 11:09am UTC](https://devforum.zoom.us/t/i-get-a-black-screen-when-just-importing-zoommtg-from-zoomus-websdk/38663/18 "2021-02-19T11:09:52Z")

</div>

Closed on February 19, 2021, 11:09am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
