Bug 233472 - Video with `autoplay` are randomly paused on M1 Macbook
Summary: Video with `autoplay` are randomly paused on M1 Macbook
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-24 06:39 PST by Serj Lavrin
Modified: 2022-01-31 01:29 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serj Lavrin 2021-11-24 06:39:47 PST
How to reproduce
================

1. Use M1 device
2. Use Safari 15
3. Run any WebRTC based application (like https://studio.restream.io)


What's happening
================

Sporadically, in about ~5 minutes, some videos in the preview become frozen. Rarely parts of the UI will disappear.

Whenever that happens, `paused` events on video elements won't fire, `paused` state shows `false`, and the ready state of the player keeps to be `4`. The internal media stream continues to be active and non of the media stream tracks is `muted`.

On top of it, attempts to `play()` video doesn't resume it in any way. However, if `pause()` is invoked, it unexpectedly resumes video play.

Another way to "fix" the issue is to switch the tab back and forth (or cover the screen with another window).

I wasn't able to identify a specific way to trigger that issue. I have a feeling it's easier to trigger if the laptop is under load and doesn't have a charger connected.

We've tested a dozen of Intel Macbooks on Big Sure and Monterey with Safari 15, and none of them has this issue. However, on M1 Macbooks it's quite easy to reproduce just by using some WebRTC application for a while.

That issue happens only in Safari. Runs fine in Chrome and Firefox.


What's expected
===============

Videos should not pause since they have `autoplay` property, or at least properly fire `paused` events so that they could be resumed.
Comment 1 Serj Lavrin 2021-11-24 07:36:22 PST
Some machines specs where we were able to reproduce the issue:

MacBook Pro 13-inch M1 2020
Chip: Apple M1
Memory: 8 GB
MacOs: 12.0.1
Safari: 15.1 (17612.2.9.1.20)

MacBook Pro 13-inch M1 2020
Chip: Apple M1
Memory: 16 GB
MacOs: 11.4
Safari: 14.1.1 (16611.2.7.1.4)
Comment 2 Radar WebKit Bug Importer 2021-12-01 06:40:22 PST
<rdar://problem/85919796>
Comment 3 Maximilian Böhm 2022-01-31 01:29:55 PST
We also confirm, that this is happening on our M1 devices. We currently test to automatically pause and resume the videos every minute.

We also have not found any indicators to detect this state. FPS, bitrate and playstate suggest that the video is healthy and running which is NOT true.

MacBook Air (M1, 2020)
Chip: Apple M1
Memory: 16 GB
macOS: Monterey 12.1
Safari: 15.2 (17612.3.6.1.6)