Bug 226698

Summary: Manually resuming a video after phone call prevents other videos in a session from resuming
Product: WebKit Reporter: Kongpheng <Kongpheng.Nanthavongsa>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: Unspecified   

Description Kongpheng 2021-06-06 09:24:10 PDT
I was able to reproduce this issue on iOS Safari 14.7 (18G5023c).

To reproduce:
* Using iOS Safari, go to https://webrtc.github.io/samples/src/content/peerconnection/pc1/
* On the console, enter: var video = $('#remoteVideo'); video.onpause = () => { console.log('paused; resuming play'); video.play(); }
* Click Start button.  If prompted for access for camera and microphone, then grant access
* Click Call button to start the one-to-one video call
* Using another phone, call the iPhone iOS Safari is running on
* From iPhone iOS Safari is running on, reject the call
* Notice that only one of the videos resumes.  The other does not.

We have a potential workaround for this issue.  Initial testing looks OK.  That said, will need to test more thoroughly.  The heuristic:
* When the pause event is dispatched after a phone call ends, check "paused" state of all video elements in application
* If other videos are paused as well, then they were likely paused because a phone call just ended
* Call play() on all video elements to ensure they're all resumed
Comment 1 Radar WebKit Bug Importer 2021-06-13 09:25:14 PDT