Bug 232006

Summary: REGRESSION(Safari 15 - iOS 15.1): Muting camera while on a call with H264 crashes tab
Product: WebKit Reporter: daginge
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Blocker CC: anonymousert+1, anonymousert2120+5, ap, avasilko, bejeyag374, foreverneilyoung, lwarlow, mjs, reducecode, rychouwei, szymon.witamborski, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: iPhone / iPad   
OS: Unspecified   

Description daginge 2021-10-20 01:00:04 PDT
When in a call using H264 on the latest 15.1 beta (which I believe is release candidate), if you try to mute the video track (enabled = false), the tab will crash. The most common case in p2p calls is iOS <-> iOS calls.

Reproduced on: 
- iPad Pro 10.5 MQDW2KN/A using iOS 15.1 (19B74)
- iPad Air (4th generation) MYFQ2NF/A using iOS 15.1 (19B74)

Repro steps:
1. Go to https://codepen.io/daginge/pen/porbmVK
2. Request permissions, then start the call. Verify you see two versions of yourself.
3. Click "Mute camera". The tab will crash

Impact:
All WebRTC calls where the outbound video track uses H264.

Workaround:
Disabling H264 seems to do the trick. I cannot reproduce when VP8 is used.
Comment 1 daginge 2021-10-20 01:10:09 PDT
Seems this is reproducible on an iPhone XR with a previous iOS 15.1 beta as well.

MRY42QN/A using 19B5060d
Comment 2 Luke Warlow 2021-10-20 02:51:38 PDT
Seems this is reproducible on Safari 15.1 on macOS too.

Tested using Beta 3 (16612.2.9.1.8) on macOS 11.6.
Comment 3 Radar WebKit Bug Importer 2021-10-20 03:03:37 PDT
<rdar://problem/84454693>
Comment 4 youenn fablet 2021-10-20 03:51:58 PDT
https://bugs.webkit.org/show_bug.cgi?id=231505 should fix this.
Comment 5 Szymon Witamborski 2021-10-20 18:58:09 PDT
Thank you Youenn for a quick reaction!

Could you confirm whether final iOS 15.1 and Safari 15.1 for macOS will ship with or without the fix?
Comment 6 Alexey Proskuryakov 2021-10-22 10:42:08 PDT

*** This bug has been marked as a duplicate of bug 231505 ***
Comment 7 daginge 2021-10-25 12:46:23 PDT
This bug was not resolved in 15.1 stable. Now all h264 usage will crash the tab. Could we get any indication for when this fix will be released?
Comment 8 Sam Sneddon [:gsnedders] 2021-10-25 15:35:51 PDT
(In reply to daginge from comment #7)
> This bug was not resolved in 15.1 stable. Now all h264 usage will crash the
> tab. Could we get any indication for when this fix will be released?

Apple does not comment on future releases.
Comment 9 youenn fablet 2021-10-29 05:41:00 PDT
(In reply to daginge from comment #7)
> This bug was not resolved in 15.1 stable. Now all h264 usage will crash the
> tab. Could we get any indication for when this fix will be released?

I would recommend checking upcoming iOS betas.
Comment 10 daginge 2021-10-29 06:50:49 PDT
(In reply to youenn fablet from comment #9)
> (In reply to daginge from comment #7)
> > This bug was not resolved in 15.1 stable. Now all h264 usage will crash the
> > tab. Could we get any indication for when this fix will be released?
> 
> I would recommend checking upcoming iOS betas.

Say no more, say no more. *touches nose profusely* ;)
Comment 11 rychouwei 2021-11-07 18:58:10 PST
two workaround:

1. Add this description to offer&answer sdp: "urn:3gpp:video-orientation", it will not cause page crash.
2. Use canvas.captureStream to capture a new video track from getUserMedia. Then, publish canvas track will not cause page crash.
Comment 12 Neil Young 2021-11-13 16:18:23 PST
Maybe this observation points into the same direction. I agree, the problem with H.264 is not solved in 15.1

https://feedbackassistant.apple.com/feedback/9757570
Comment 13 Neil Young 2021-11-13 16:19:57 PST
BTW: The crash does not happen if Safari acts as subscriber, even though the same H.264 SDP Offer comes in from the outside. But here Safari just decodes
Comment 14 Szymon Witamborski 2021-12-16 19:50:59 PST
It appears that this patch landed in iOS and Safari 15.2