aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
699 stars 471 forks source link

Chime logs WARN messages when users leave meetings #2796

Open samspycher opened 8 months ago

samspycher commented 8 months ago

What happened and what did you expect to happen?

Chime is spamming our logs with WARN level entries when ours users leave meetings. My observations and expectations are documented for each message individually below

WARN: No transition found from Disconnecting with Update

Observation

When leaving a meeting, a common error users experience is that the camera light is left running, because the [documented way](https://aws.github.io/amazon-chime-sdk-js/modules/apioverview.html#:~:text=To%20stop%20the%20meeting%20session%2C%20call%20meetingSession.audioVideo.stop().) to end meetings is incomplete, and [further documentation](https://aws.github.io/amazon-chime-sdk-js/modules/faqs.html#after-leaving-a-meeting-the-camera-led-is-still-on-indicating-that-the-camera-has-not-been-released-what-could-be-wrong:~:text=meetingSession.audioVideo.stopVideoInput()%3B) needs to be observed. This is confirmed by our experience and also several stackoverflow questions on the topic [1], [2].

So the way we leave meetings is as follows:

await  audioVideo.stopVideoInput();
audioVideo.stop();

Unfortunately, calling stopVideoInput seems to make this line log a console.warn message, which is currently spamming our log:

No transition found from Disconnecting with Update

Expectation

Two options:

WARN: no stream found for tile=null

Observation

The final log message we get from Chime when leaving meetings is also a WARN:

no stream found for tile=null

This message stems from removeRemoteVideoTrack

Possible cause: Please don't ask why, but we are running the Chime implementation of video calls alongside another implementation. For architectural reasons, this has led us to bind remote Chime media streams ourselves onto <video> elements. So in the videoTileDidUpdate handler from AudioVideoObserver we are not calling bindVideoElement as documented here. Instead, we are simply adding the incoming stream to the video element with a react ref.

Expectation

If we never add a stream to a tile when starting remote video, Chime should not log a warning that no stream exists on the tile when the call ends?

Overall Expectations

From the API user perspective , fully leaving meetings (and releasing all employed resources) should be a single line of code. Perhaps I am missing something? But if not, the percentage of users who are googling in frustration after chapter 4 left their camera light running must be close to 100%. So if stopVideoInput is truly necessary, then I would suggest documenting this already in the API overview.

Have you reviewed our existing documentation?

Reproduction steps

  1. Create a meeting, and add leaving code as follows:

    await  audioVideo.stopVideoInput();
    audioVideo.stop();
  2. bind incomingStrem for remote video directly to a <video> element

  3. Run video call, end it, observe WARN messages

Amazon Chime SDK for JavaScript version

3.16.0

What browsers are you seeing the problem on?

Chrome

Browser version

118.0.0

Meeting and Attendee ID Information.

No response

Browser console logs

chime-console.log

dnietodev commented 7 months ago

Im having the exact problem, camera led and chrome tells that camera and microphone is being used, How exactly im supposed to end totally a meeting?

hung-mid commented 4 months ago

same here :(