<?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>187677</bug_id>
          
          <creation_ts>2018-07-14 10:37:03 -0700</creation_ts>
          <short_desc>Local MediaStream cloned video stops playing when original stream video is hidden/redisplayed</short_desc>
          <delta_ts>2019-06-13 12:54:06 -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>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=198840</see_also>
          <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>1442223</commentid>
    <comment_count>0</comment_count>
    <who name="Chad Phillips">webkit</who>
    <bug_when>2018-07-14 10:37:03 -0700</bug_when>
    <thetext>Test case here:

https://staging-connect.circleanywhere.com/public/ios/local-video-copy-display-bug/

Steps to reproduce:

1. Load the page, notice that the local MediaStream-backed video properly autoplays.
2. Click the &apos;Toggle local&apos; button to hide the video, click again to redisplay. Notice that the video continues to properly autoplay.
3. Click the &apos;Copy local&apos; button. This uses the MediaStream.clone() method to copy the stream, remove the audio track, and display the cloned stream in another video element. Notice that both the original MediaStream-backed video and the cloned MediaStream-backed video properly autoplay.
4. Click the &apos;Toggle local&apos; video button, notice that the cloned MediaStream-backed video continues to properly autoplay.
5. Click the &apos;Toggle local&apos; video button, notice that the original MediaStream-backed video autoplays, but the cloned MediaStream-backed video does NOT.

According to https://webkit.org/blog/7763/a-closer-look-into-webrtc/, &quot;MediaStream-backed media will autoplay if the web page is already capturing&quot;, so the fact that the cloned stream stops playing violates this policy.

This bug is troublesome in more complex video applications, where it&apos;s cleaner design to display different copies of the same MediaStream than to move video elements around in the DOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1442243</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-07-14 14:46:45 -0700</bug_when>
    <thetext>&lt;rdar://problem/42205888&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>