Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox video sharing results in losing audio-track for attendee that shares #1418

Closed
ReneS1991 opened this issue Jul 8, 2021 · 1 comment

Comments

@ReneS1991
Copy link

ReneS1991 commented Jul 8, 2021

NOTE: This issue is not necessarily about reporting a bug, but rather asking about a workaround.

Some time ago I reported the bug about sharing a video file that is black for recipients when send in Chrome or Edge: #1031

Now, I stumbled upon the problem that in Firefox when sharing a video-file (from an html <video> stream) the audio of that video is missing for the person sharing the video. So basically what we do in our system is:

  1. We create a <video> tag and set the src of it to the URL of the video
  2. We capture the stream of the video
  3. We send the stream to Chime using startContentShare(mediaStream)

This works fine for the video-track itself, and the audio-track is being received by all other attendees fine as well, but for the person sharing the video the audio is completely gone. After some research I found out that this is caused by a bug in Firefox when using the mozCaptureStream, as defined in https://bugzilla-dev.allizom.org/show_bug.cgi?id=1178751 and https://bugzilla-dev.allizom.org/show_bug.cgi?id=1573031.

Now, at this point I don't know how to work around this bug and make the audio work again in Firefox. Also, because Chrome and Edge are not working properly either, the need for a workaround or fix for this problem is higher, which is why I am asking you guys for help. Currently my JS looks as followed (sidenote, it's in Vue):

async streamSelectedVideo(videoUrl) {
    // ...

    // The "videoShareElement" is the <video>
    videoShareElement.src = videoUrl;

    // ...

    await videoShareElement.play();
    let mediaStream = null;
    if (typeof videoShareElement.captureStream === 'function') {
        mediaStream = videoShareElement.captureStream();
    } else if (typeof videoShareElement.mozCaptureStream === 'function') {
        mediaStream = videoShareElement.mozCaptureStream(); // This removes the audio-track from the <video>
    }

    // ...

    await this.meetingSession.audioVideo.startContentShare(mediaStream);
},

In the Firefox bug reports, 1 person described the following workaround but I wasn't able to get that to work so I am kinda stuck there as well:

Also, if you are looking for a workaround, you can hook up the element to the WebAudio destination node through a MediaElementAudioSourceNode. Volume and such carries through from the element that way, though there's a bug that makes it ~1s delayed.

Any help would be very very welcome! Whether it is a fix, workaround, or other ideas, everything is welcome at this point. :)

Platform

  • OS: MacOS
  • Browser: Firefox
  • Browser Version: 89.0.2
  • Amazon Chime SDK: 2.13.0
@georgezy-amzn
Copy link
Contributor

Closing this due to inactivity. Please reopen or submit a support case if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants