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 473 forks source link

Screen share not working as expected in Firefox and Safari #2871

Closed virajhk closed 1 month ago

virajhk commented 3 months ago

What happened and what did you expect to happen?

When a user tries to share screen on Firefox and Safari, the presenter sees that the screen is being shared, but the receiver doesn't see anything being presented. Presenter also sees the following error in console:

[ERROR] ChimeComponentLibraryReactDemo - error during state Connected with action FinishUpdating: TypeError: this.meetingSessionContext.videoCaptureAndEncodeParameter is undefined

Upon clicking stop sharing, nothing happens and the presenter's screen is stuck in sharing mode until the browser window is refreshed.

Attaching a video for reference:

https://github.com/aws/amazon-chime-sdk-js/assets/4435293/ad1c7bb4-1ff6-4311-a6b4-b8f87b905adb

Note: Screen sharing works perfectly in Chrome.

Have you reviewed our existing documentation?

Reproduction steps

Try sharing screen on Firefox/Safari and notice that the presenter is able to see that the screen is being shared, but the receiver doesn't see anything. Also, upon trying to stop sharing, notice that contentShareDidStop callback doesn't get triggered when it's added as an observer in audioVideo.addContentShareObserver.

Amazon Chime SDK for JavaScript version

3.17.0

What browsers are you seeing the problem on?

Firefox and Safari

Browser version

Firefox - 124.0.2 (64-bit), Safari - 17.2.1 (19617.1.17.11.12)

Meeting and Attendee ID Information.

No response

Browser console logs

[ERROR] ChimeComponentLibraryReactDemo - error during state Connected with action FinishUpdating: TypeError: this.meetingSessionContext.videoCaptureAndEncodeParameter is undefined
paulocastellano commented 3 months ago

+1

hensmi-amazon commented 2 months ago

Is this only in the React components library? Does this still reproduce with the latest SDKs? We have not been able to reproduce in the latest versions.

ltrung commented 2 months ago

Can you attach the full browser log to us or cut us a support ticket?

xd6 commented 1 month ago

We're seeing this issue with Firefox build 126. I found it was due to this screen share simulcasting (https://github.com/aws/amazon-chime-sdk-js/blob/main/src/audiovideocontroller/DefaultAudioVideoController.ts#L1140). When I removed this call meetingSession.audioVideo.enableSimulcastForContentShare(true) it fixed the issue on Firefox.

hensmi-amazon commented 1 month ago

We don't officially support simulcast for camera or screen share on Firefox at this time. You should gate usage of that function with a check on the browser.

hensmi-amazon commented 1 month ago

Please reopen if the issue is not when using simulcast on firefox or safari.