Bug 240335 - set `MediaStreamTrack enbaled = false` cause Aplication crash in iOS Safari 15.1
Summary: set `MediaStreamTrack enbaled = false` cause Aplication crash in iOS Safari 15.1
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-12 02:07 PDT by yuki uchida
Modified: 2022-05-12 04:14 PDT (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 yuki uchida 2022-05-12 02:07:53 PDT
# Overview
When using WebRTC connection, MediaStreaemTrack(video) enabled option cause application crash

## steps to reproduce
device A: iOS Safari
device B: Any(ChromeM101 on Mac and iPadOS(unknown version) was tested)

1. (device A&B) visit https://yasubaba.github.io/prodSkyWay/room_videoMute/
2. (device A&B) Accept permissions for camera and microphone.
3. join Room and start WebRTC Connection.
4. (device A) click `Video Mute/Unmute` 
5 (device A) iOS Safari crashed.


The mute procedure is very simple as follows
```
document.getElementById('js-videoEnabled').addEventListener('click', () => {
  localStream.getVideoTracks().forEach( track => {
    track.enabled = !track.enabled;
  });
})
```


## Actual Results
iOS Safari always crash.

## Expected Results
No error occurs.

## Hardware
iPhone12 iOS15.1


I prepared safari crash log, but i don't know how to share with you.
I can prepare google Drive URL, but I am not sure if it is okay to keep the crash log in a publicly visible location.
If you need crash log, please tell me how to share.
Comment 1 youenn fablet 2022-05-12 04:14:43 PDT
This should be fixed in iOS 15.3 and above.