amazon-chime-sdk-js icon indicating copy to clipboard operation
amazon-chime-sdk-js copied to clipboard

Getting type errors when startVideoPreviewForVideoInput is called

Open vijayghaghre opened this issue 3 years ago • 2 comments

What happened and what did you expect to happen?

Hi team,

We can see following errors when startVideoPreviewForVideoInput is called:

  1. TypeError: Cannot read properties of undefined (reading stream)
  2. TypeError: this.activeDevices.video is undefined
  3. TypeError: undefined is not an object (evaluating this.activeDevices.video.stream)

Have you reviewed our existing documentation?

Reproduction steps

Try to Start/Connect any meeting/Conference.

Amazon Chime SDK for JavaScript version

2.31.0

What browsers are you seeing the problem on?

Chrome, Edge

Browser version

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.66 Safari/537.36 Edg/103.0.1264.44 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36

Meeting and Attendee ID Information.

No response

Browser console logs

TypeError: Cannot read properties of undefined (reading 'stream') at y.startVideoPreviewForVideoInput (/hz-av-aws-chime.4c2550c1e2a4c9317aaf.js:1:92235) at t.default.startVideoPreviewForVideoInput (/hz-av-aws-chime.4c2550c1e2a4c9317aaf.js:1:41477) at g.toggleLocalVideo

vijayghaghre avatar Aug 09 '22 10:08 vijayghaghre

Have you tried calling startVideoInput before calling startVideoPreviewForVideoInput?

https://github.com/aws/amazon-chime-sdk-js/blob/bec0e13331ee1ff9198070dd2a6bb1bd289dd14e/guides/17_Migration_to_3_0.md#updates-to-the-video-input-api

michhyun1 avatar Aug 09 '22 17:08 michhyun1

The reported issue is on 2.31.0 hence the migration guide wont apply here, but I agree with Michael could you please check whether you are calling chooseVideoInputDevice API before starting the video preview.

Request to attach full browser console logs for checking more, current one just show the error. API overview

Also please note that we wont be doing any fixes for 2.x unless a critical security issue or a bug, thus, suggest migrating to v3.

devalevenkatesh avatar Aug 09 '22 17:08 devalevenkatesh

@vijayghaghre Any updates on this issue? Were you able to resolve it?

nainkunal933 avatar Aug 17 '22 23:08 nainkunal933

@nainkunal933 We are migrating to 3.6.0 so will update once this migration is done.

vijayghaghre avatar Aug 18 '22 04:08 vijayghaghre

Resolving as no response. Please open a new ticket if the issue exists

michhyun1 avatar Sep 01 '22 20:09 michhyun1