# JS exception when calling .init() with IP address

**URL:** <https://devforum.zoom.us/t/js-exception-when-calling-init-with-ip-address/50241>\
**Category:** Web\
**Created:** [May 13, 2021, 9:59pm UTC](https://devforum.zoom.us/t/js-exception-when-calling-init-with-ip-address/50241 "2021-05-13T21:59:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianWD](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brianwd/32/21247_2.png) [@brianWD](https://devforum.zoom.us/u/brianWD)\
**Post date:** [May 13, 2021, 9:59pm UTC](https://devforum.zoom.us/t/js-exception-when-calling-init-with-ip-address/50241/1 "2021-05-13T21:59:44Z")

</div>

This sequence of code causes an exception:

```
  this.client = ZoomVideo.createClient();

 const initRes = await this.client.init(
    'en-US',
    'http://192.168.1.172:3333/@zoomus/instantsdk/dist/lib'
  );

```

However the same call made to/using localhost, on the computer assigned to IP  
192.168.1.172, is working just fine.

And the files in the SDK are reachable when that IP url is entered in a browser address line. (e.g. http:// 192.168.1.172:3333/ @zoomus/instantsdk/dist/lib/webim.min.js - minus spaces, which I just put in to prevent this editor from making the URL clickable - returns the minified JS file specified)

What may be the issue here?

This is the console error that we’re getting:

```
TypeError: Cannot read property 'getDisplayMedia' of undefined
at Function.checkSystemRequirements (index.umd.js:1)
at t.value (index.umd.js:1)
at VideoService.<anonymous> (video.service.ts:82)
at Generator.next (<anonymous>)
at tslib.es6.js:73
at new ZoneAwarePromise (zone-evergreen.js:960)
at __awaiter (tslib.es6.js:69)
at VideoService.launchVideo (video.service.ts:70)
at VideoChatComponent.<anonymous> (video-chat.component.ts:24)
at Generator.next (<anonymous>)

```

Web Video SDK version 1.0.3  
Running in Angular 11.0.2, Testing in latest Google Chrome

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [May 14, 2021, 6:38am UTC](https://devforum.zoom.us/t/js-exception-when-calling-init-with-ip-address/50241/2 "2021-05-14T06:38:32Z")

</div>

Hey @brianWD

Thanks for sharing your questions.

According to the specification of [MediaDevices](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices), it only can be accessible in a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts). So you can use `http://localhost` or `https://` to serve the assets.

Thanks  
Vic

---

<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:** [June 13, 2021, 4:39pm UTC](https://devforum.zoom.us/t/js-exception-when-calling-init-with-ip-address/50241/3 "2021-06-13T16:39:18Z")

</div>

Closed on June 13, 2021, 4:39pm UTC

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