Bug 236785 - getUserMedia breaks video tag with audio
Summary: getUserMedia breaks video tag with audio
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 15
Hardware: Unspecified macOS 12
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-17 08:30 PST by Francesco Durighetto (kekkokk)
Modified: 2022-06-23 15:33 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).