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

Zoomed in effect when Simulcast is enabled

Open zepedr0 opened this issue 1 year ago • 2 comments

What happened and what did you expect to happen?

If I set enableSimulcastForUnifiedPlanChromiumBasedBrowsers as true in the MeetingSessionConfiguration, my camera loads with a zoomed in effect.

Have you reviewed our existing documentation?

Reproduction steps

This is possible to reproduce in the demo application, but I think it is only happening with M2 macbooks. Make sure to set configuration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers = true (if simulcast is enabled in the frontend options it does not work, it should be hardcoded as true), and that your camera is not active anywhere else (green light is turned off). After joining the meeting and turning on the camera the image should start zoomed in (if it doesn't, turn the video off, wait for the green light to turn off, and the start the video on again).

Issue seems related to the Facetime camera recording in a vertical mode:

Screenshot 2024-02-19 at 16 49 27

Instead of the standard horizontal mode:

Screenshot 2024-02-19 at 16 50 23

Amazon Chime SDK for JavaScript version

[email protected]

What browsers are you seeing the problem on?

Chrome

Browser version

Version 121.0.6167.160 (Official Build) (arm64)

Meeting and Attendee ID Information.

No response

Browser console logs

localhost-1708358470439.log

zepedr0 avatar Feb 19 '24 16:02 zepedr0

Thanks for the report! I was able to reproduce this with an M2 laptop, seems to be some unwanted interaction with the built in camera when we set media constraints. I will have a fix in the next release, but given that will not be too soon, you can mitigate this issue with code like the following:

    if (new DefaultBrowserBehavior().hasChromiumWebRTC()) {
        configuration.videoUplinkBandwidthPolicy = new DefaultSimulcastUplinkPolicy(
            configuration.credentials.attendeeId,
            this.meetingLogger
          );
        configuration.videoUplinkBandwidthPolicy.chooseMediaTrackConstraints = (): MediaTrackConstraints => {
            const trackConstraint: MediaTrackConstraints = {
              width: { ideal: 1280 },
              height: { ideal: 720 },
              frameRate: { ideal: 15 },
            };
            return trackConstraint;
          }
      }

      this.meetingSession = new DefaultMeetingSession(
         configuration,
         this.meetingLogger,
         this.deviceController,
         new DefaultEventController(configuration, this.meetingLogger, this.eventReporter)
     );

hensmi-amazon avatar Feb 20 '24 20:02 hensmi-amazon

Thank you for looking into this so fast! That workaround seems to have fixed our issue for now 🙌

zepedr0 avatar Feb 21 '24 12:02 zepedr0

Latest version is released, closing

hensmi-amazon avatar Apr 02 '24 19:04 hensmi-amazon