<?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>187227</bug_id>
          
          <creation_ts>2018-06-30 17:43:00 -0700</creation_ts>
          <short_desc>Cloned MediaStream audio attached to peer connection causes local echo</short_desc>
          <delta_ts>2018-10-05 06:39:03 -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>WebRTC</component>
          <version>Safari 11</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chad Phillips">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1438240</commentid>
    <comment_count>0</comment_count>
    <who name="Chad Phillips">webkit</who>
    <bug_when>2018-06-30 17:43:00 -0700</bug_when>
    <thetext>1. Peer connection with inbound/outbound audio/video stream attached to a video element
2. Clone the stream to re-use on another peer connection, and attach to other audio/video elements
3. Hide the first video element

This results in a local echo coming from the user&apos;s own microphone, not from any inbound audio.

What&apos;s really weird is that if I display the first video element again, the echo goes away and doesn&apos;t return.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1438364</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-07-01 17:14:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/41704722&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1438365</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2018-07-01 17:14:49 -0700</bug_when>
    <thetext>Thanks for the report, would you be able to provide a jsfiddle or something like that so that we can easily reproduce the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1438863</commentid>
    <comment_count>3</comment_count>
    <who name="Chad Phillips">webkit</who>
    <bug_when>2018-07-03 09:07:58 -0700</bug_when>
    <thetext>Still trying to find a simple way to reproduce this issue for testing.

In the process I believe I at least found why the echo stops if I display the first video stream again.

As a simple demonstration, I recorded the issue, viewable here: https://youtu.be/eVQVSy6Edt8

The first playing video is a peer connection that&apos;s also sending local audio/video to a conferencing application. When I start a second peer connection that also has local audio/video, you&apos;ll see that the first video stops (audio stops too).

This doesn&apos;t seem to accord with the rules listed at https://webkit.org/blog/7763/a-closer-look-into-webrtc/, which say &quot;MediaStream-backed media will autoplay if the web page is already playing audio&quot;, so I&apos;m wondering if another bug is in order here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1466676</commentid>
    <comment_count>4</comment_count>
    <who name="Chad Phillips">webkit</who>
    <bug_when>2018-10-05 06:39:03 -0700</bug_when>
    <thetext>This turned out to be audio playing from a video element with a local stream attached. Setting the mute property on the local video element solved the issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>