<?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>215213</bug_id>
          
          <creation_ts>2020-08-06 05:09:36 -0700</creation_ts>
          <short_desc>[iOS 14] MediaStream becomes inactive after video it was assigned to is removed from the DOM</short_desc>
          <delta_ts>2020-08-10 09:29:37 -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>Media</component>
          <version>Other</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>214262</dup_id>
          
          <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="Artjom">artjomvinnikov</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>1678234</commentid>
    <comment_count>0</comment_count>
    <who name="Artjom">artjomvinnikov</who>
    <bug_when>2020-08-06 05:09:36 -0700</bug_when>
    <thetext>OS: iOS 14 Beta 3

Steps:

1. Request a stream with getUserMedia and feed it into &lt;video&gt; via srcObject
2. Remove video from the DOM
3. After ~5 seconds camera stream becomes inactive. Camera recording icon gets hidden from url bar, and stream.active returns false.

Small demo to reproduce: https://codesandbox.io/s/smoosh-thunder-1frcl?file=/index.html

Not sure if this is desired behaviour, but it doesn&apos;t happen with Safari 13.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1678296</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-08-06 10:44:00 -0700</bug_when>
    <thetext>&lt;rdar://problem/66634379&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1678298</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-08-06 10:54:06 -0700</bug_when>
    <thetext>Thanks Artjom, this might be the memory leak that happens when video element is not rendered but playing.
This should be fixed by https://bugs.webkit.org/show_bug.cgi?id=214262 patch in https://trac.webkit.org/changeset/264312.
I would think this change is included in latest iOS beta 4.
Can you validate this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679020</commentid>
    <comment_count>3</comment_count>
    <who name="Artjom">artjomvinnikov</who>
    <bug_when>2020-08-10 00:25:36 -0700</bug_when>
    <thetext>(In reply to youenn fablet from comment #2)
&gt; Thanks Artjom, this might be the memory leak that happens when video element
&gt; is not rendered but playing.
&gt; This should be fixed by https://bugs.webkit.org/show_bug.cgi?id=214262 patch
&gt; in https://trac.webkit.org/changeset/264312.
&gt; I would think this change is included in latest iOS beta 4.
&gt; Can you validate this?

Yes, updating to Beta 4 resolved the issue. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679069</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2020-08-10 09:29:37 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 214262 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>