<?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>241480</bug_id>
          
          <creation_ts>2022-06-09 12:25:58 -0700</creation_ts>
          <short_desc>[iOS] WKWebView WebRTC session loses microphone input when the app goes into the background</short_desc>
          <delta_ts>2022-06-16 12:26:12 -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>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 15</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=226620</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=233419</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Evgeny">ep</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1875068</commentid>
    <comment_count>0</comment_count>
    <who name="Evgeny">ep</who>
    <bug_when>2022-06-09 12:25:58 -0700</bug_when>
    <thetext>iOS WKWebView WebRTC session loses microphone input when the app goes into the background, irrespective of the app entitlements.

The sound from the other connection peer remains active.

Interestingly, while the app is moved to recent apps view (I believe, the app is in the inactive phase), the microphone input is still active, it only disappears when the app goes into the the background phase.

When the app is returned to foreground (active phase), the microphone input resumes again.

This issue can be experimented with in our app: https://apps.apple.com/us/app/simplex-chat/id1605771084

The source code for the page in WKWebView: https://github.com/simplex-chat/simplex-chat/blob/stable/packages/simplex-chat-webrtc/src/call.ts

The source code for iOS: https://github.com/simplex-chat/simplex-chat/blob/stable/apps/ios/Shared/Views/Call/WebRTCView.swift</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1876298</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-16 12:26:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/95321578&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>