Bug 187677 - Local MediaStream cloned video stops playing when original stream video is hidden/redisplayed
Summary: Local MediaStream cloned video stops playing when original stream video is hi...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 11
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-14 10:37 PDT by Chad Phillips
Modified: 2019-06-13 12:54 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Phillips 2018-07-14 10:37:03 PDT
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 'Toggle local' button to hide the video, click again to redisplay. Notice that the video continues to properly autoplay.
3. Click the 'Copy local' 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 'Toggle local' video button, notice that the cloned MediaStream-backed video continues to properly autoplay.
5. Click the 'Toggle local' 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/, "MediaStream-backed media will autoplay if the web page is already capturing", so the fact that the cloned stream stops playing violates this policy.

This bug is troublesome in more complex video applications, where it's cleaner design to display different copies of the same MediaStream than to move video elements around in the DOM.
Comment 1 Radar WebKit Bug Importer 2018-07-14 14:46:45 PDT
<rdar://problem/42205888>