<?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>204682</bug_id>
          
          <creation_ts>2019-11-28 07:34:12 -0800</creation_ts>
          <short_desc>PeerConnection: Remote audio is muted if user receives phone call (even if phone call dismissed)</short_desc>
          <delta_ts>2020-03-23 10:09:02 -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 13</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Dag-Inge Aas">daginge</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>gabor</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1594040</commentid>
    <comment_count>0</comment_count>
    <who name="Dag-Inge Aas">daginge</who>
    <bug_when>2019-11-28 07:34:12 -0800</bug_when>
    <thetext>Summary:
If a user is in a WebRTC call and receives an incoming phone call, dismisses it, and comes back to Safari, the remote audio is muted.

Steps to reproduce:
1. Go to https://webrtc.github.io/samples/src/content/peerconnection/pc1/ on an iPhone running iOS 13.2.3
2. Start a peer connection
3. Verify that you hear the other side
4. Receive incoming phone call and dismiss it
5. Observe that you are taken back to Safari, and that the remote audio is now gone.
6. Hang up the call
7. Click &quot;Call&quot; again
8. Observe that you can now hear the other side again

Expected behaviour:
The video call is muted while the phone call is in progress, but that audio is resumed once the phone call has been ended/dismissed.

Actual behaviour:
The video call remote end is muted until the peer connection is restarted (does not seem like iceRestart does anything, has to be a new peer connection, possibly just a new video element).

Impact:
All sites using WebRTC on Safari for iOS, where the user might get a call in the middle of the video call.

Workaround:
Seems like restarting the peer connection or refreshing the page helps. You can somewhat detect this issue by doing audio analysis using WebAudio to check the output data of the remote stream. This appears to be 0. I have found no other workaround as of yet, but suspect killing the video DOM element and adding a new one should fix things.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1630267</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-03-16 01:32:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/60486776&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632748</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-03-23 01:11:17 -0700</bug_when>
    <thetext>I believe https://bugs.webkit.org/show_bug.cgi?id=209411 and https://bugs.webkit.org/show_bug.cgi?id=209412 will fix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1632896</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-03-23 10:09:02 -0700</bug_when>
    <thetext>Closing as both bugs are fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>