amazon-chime-sdk-js
amazon-chime-sdk-js copied to clipboard
Getting type errors when startVideoPreviewForVideoInput is called
What happened and what did you expect to happen?
Hi team,
We can see following errors when startVideoPreviewForVideoInput is called:
- TypeError: Cannot read properties of undefined (reading stream)
- TypeError: this.activeDevices.video is undefined
- 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
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
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.
@vijayghaghre Any updates on this issue? Were you able to resolve it?
@nainkunal933 We are migrating to 3.6.0 so will update once this migration is done.
Resolving as no response. Please open a new ticket if the issue exists