I am getting this error on production: VM53:3 TypeError: Cannot use 'in' operator to search for 'getDisplayMedia' in undefined

I am using React 17 with @zoomVideoSDK for video call functionality. My code was working fine locally but when i moved it to production It’s giving me this error and I’m not sure what it’s all about.

here is my code for joining session

 if (!session) {
    if (ZoomVideo.checkSystemRequirements().video && ZoomVideo.checkSystemRequirements().audio) {
      client.init('en-US', 'Global', { patchJsMedia: true }).then(() => {
        client.join('Cool Cars', token, 'users').then(() => {
          stream = client.getMediaStream();
          // stream?.startVideo({ videoElement: document.getElementById('my-self-view-video') });
          // stream?.startAudio();
          startSelfVideo();
          setSession(true);
          console.log('-- Here stream --', stream);
        }).catch((error) => {
          console.log('-- Here zoom session error getmedia --', error);
        });
      });
    }
  }


Description

Browser Console Error
The full error message or issue you are running into.

Which Web Video SDK version?
Knowing the version can help us to identify your issue faster. [e.g. 1.0]

Video SDK Code Snippets
The code snippets that are causing the error / issue so we can reproduce.

Troubleshooting Routes
The troubleshooting attempt types you’ve already exhausted, including testing with the appropriate sample app (found on Zoom · GitHub).

Device (please complete the following information):

  • Device: HP Pavillion15
  • OS: windows10
  • Browser: Brave
  • Browser Version : 1.63.162 Chromium: 122.0.6261.69 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

Hey @ashok.kumar

Thanks for your feedback.

Video SDK requires running in a secure context to use audio/video functionality. Could you please check the execution result of this statement on the running page?

console.log(window.isSecureContext);

Thanks
Vic

1 Like

Hey @vic.yang, thank you for replying. it’s giving false value for window.isSecureContext in production. So what would be the solution for this situation.

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