Bug 183368 - Video stream will freeze with WebRTC in iphone (ios 11)
Summary: Video stream will freeze with WebRTC in iphone (ios 11)
Status: RESOLVED FIXED
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:
Depends on:
Blocks:
 
Reported: 2018-03-06 08:17 PST by Jia Li
Modified: 2018-03-08 07:03 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jia Li 2018-03-06 08:17:23 PST
The reproduce is here.

https://webrtc-angular-test.stackblitz.io/

1. click start button. the video of left is ok
2. click call button, the video of right is ok, but the video of left freeze.

This demo works in chrome, and safari 11 on mac, but not work in iphone 11.2.6
Comment 1 youenn fablet 2018-03-06 09:02:09 PST
Hi Jia,

I can repro your issue.
Looking at your example, it does not seem like it freezes but it pauses the video when starting to play the other video. If you add controls to the video element, you can see this happening.

Your example seems close to https://webrtc.github.io/samples/src/content/peerconnection/pc1/
This example when tweaked to add playsinline for each video element should work fine, maybe you can take inspiration from this example.

The reason is that your local video is not muted, maybe WebKit has a bug there.
The workaround would be to set a MediaStream with just one video track and no audio track.
Comment 2 youenn fablet 2018-03-06 10:14:46 PST
Note that chrome and safari/Mac have no restrictions on playing two videos with sound at the same time, hence why this is working.

Testing on Chrome and Safari/Mac, the first video element is not muted either there.
There is probably a problem in the way the video element is created/configured.

Closing the bug as behaving correctly.
Please reopen it if needed and let me know your findings there.
Comment 3 Jia Li 2018-03-08 07:03:03 PST
Hi, youenn fablet

Thank you for your comment, the similar sample here https://plnkr.co/edit/29EIKct9R3ZU5cWfwnsv?p=info
can work correctly.

The sample not working is in angular environment, so I am trying to find out which library 
breaks. 

I will try to debug further and let you know if I find anything new.