<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>236785</bug_id>
          
          <creation_ts>2022-02-17 08:30:53 -0800</creation_ts>
          <short_desc>getUserMedia breaks video tag with audio</short_desc>
          <delta_ts>2022-06-23 15:33:10 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Audio</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Francesco Durighetto (kekkokk)">francesco.durighetto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1842915</commentid>
    <comment_count>0</comment_count>
    <who name="Francesco Durighetto (kekkokk)">francesco.durighetto</who>
    <bug_when>2022-02-17 08:30:53 -0800</bug_when>
    <thetext>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&apos;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 &quot;unmuted&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1843660</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-02-18 14:49:38 -0800</bug_when>
    <thetext>&gt; not happening on Safari 15.1 and 15.4 dev preview

While I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1845376</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-23 15:43:22 -0800</bug_when>
    <thetext>&lt;rdar://problem/89382851&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1877932</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-06-23 15:33:10 -0700</bug_when>
    <thetext>We believe this is resolved in Safari 15.4 (and newer).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>