[Webkit-unassigned] [Bug 281758] New: Safari 18 publishes audio from disabled MediaStreamTrack

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 18 09:47:30 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=281758

            Bug ID: 281758
           Summary: Safari 18 publishes audio from disabled
                    MediaStreamTrack
           Product: WebKit
           Version: Safari 18
          Hardware: All
                OS: iOS 18
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: WebRTC
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joseph at podwys.com
                CC: youennf at gmail.com

Created attachment 472987

  --> https://bugs.webkit.org/attachment.cgi?id=472987&action=review

A screen capture demonstrating Safari 18 publishing the audio from a disabled MediaStreamTrack

## Description
I built a WebRTC application that has a "Lobby" experience wherein users are allowed to change hardware/apply effects/disable devices prior to entering the video room. In Safari 18 disabling the mic prior to connecting to the video room results in everyone else in the room being able to hear you. This was not an issue in Safari 17 and is not an issue in Chrome.

Please watch the attached screen capture. I demonstrate that Safari knows the MediaStreamTrack is disabled and still publishes its audio.

## Which platforms are impacted?
Desktop Safari 18 and all iOS browsers on iOS 18.

## Technical Details
When my application loads, I acquire the user's camera and mic. If the user disables their camera, I release the hardware with MediaStreamTrack.stop(). If the user disables their mic, I do not release their hardware but instead set the MediaStreamTrack's enabled property to false. This stops sending audio to other participants.

In Safari 18, I have confirmed that both prior to connecting to the video room and immediately after connecting to the video room, the user's mic MediaStreamTrack.enabled value is false. However, despite being false, all other participants can hear the Safari 18 user.

## Expected Results
When publishing a disabled MediaStreamTrack, Safari should not publish bytes from that track.

## Temporary Mitigation
I noticed that impacted users who manually enable then disable their microphone after connecting to the video room end up with the desired result - their mic no longer transmits audio. With that in mind, I'm currently putting a mitigation approach through our QA process. The solution checks a user's mic MediaStreamTrack.enabled value immediately after connecting to the video room. If the mic's enabled state is false, I toggle the enabled state to true then false. This currently appears to fix the issue, though it has not yet reached out production environment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241018/d236666e/attachment.htm>


More information about the webkit-unassigned mailing list