Bug 236785

Summary: getUserMedia breaks video tag with audio
Product: WebKit Reporter: Francesco Durighetto (kekkokk) <francesco.durighetto>
Component: Web AudioAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Critical CC: bfulgham, cdumez, eric.carlson, jer.noble, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: macOS 12   

Description Francesco Durighetto (kekkokk) 2022-02-17 08:30:53 PST
Safari 15.3 on Monterey (not happening on Safari 15.1 and 15.4 dev preview)

Steps to reproduce:
- create a peerconnection (subscribe only) to a remote audio and video.
- create a video AND audio HTMLelements and apply as srcObj the audio + video stream just subscribed.
- set the videoHtmlElement as muted = true

observe:
- everything works as expected, I can hear remote stream from the audio tag and see the remote video in the video tag (i CANNOT hear, as expected, the audio track from the video tag since it's muted)

what breaks:
- i call getUsermedia({audio: true, video: true}) in the same page

observe:
- I now hear the remote side twice

what happened:
- the video element showing the remote stream "unmuted" itself, despite the fact that $0.muted is showing true

proof:
- set the video element to muted= false and then muted = true again and the double audio disappears.

Workaround:
- create a new mediaStream with only a track (one for video and one for audio) and assign them to the HTMLElement. But this breaks Safari 13 since MediaStreamTrack.clone() is broken :(

HALP

TLDR:
- calling getUserMedia unmute all video tags in the page
Comment 1 Alexey Proskuryakov 2022-02-18 14:49:38 PST
> not happening on Safari 15.1 and 15.4 dev preview

While I'm not an expert in this area, not happening with 15.4 dev preview would indicate that this is already fixed in WebKit code base.
Comment 2 Radar WebKit Bug Importer 2022-02-23 15:43:22 PST
<rdar://problem/89382851>
Comment 3 Brent Fulgham 2022-06-23 15:33:10 PDT
We believe this is resolved in Safari 15.4 (and newer).