| Summary: | [macOS] Screen recording in background tab only works for about 1 minute | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | modler.daniel |
| Component: | WebRTC | Assignee: | youenn fablet <youennf> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | eric.carlson, jer.noble, webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 15 | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 11 | ||
|
Description
modler.daniel
2022-08-21 04:17:46 PDT
I also found out that this seems to be related to the display stream and not to MediaRecorder. It's easy to reproduce that by using WebRTC. * Create a room at jitsi meet in Safari * Join the room on another pc * Share only screen on Safari * Put Safari into background * Wait one minute After that, the screen stream will be throttled down to about 1 frame every 1 seconds. Found out that this happens on Intel Macs, but not on Silicon Macs (with the same latest Safari 15.6). Unfortunately, I cannot detect Apple Silicon from my web application. Pull request: https://github.com/WebKit/WebKit/pull/3528 Just wanted to add a few more observations in case they are helpful: * This happens also when the tab is additionally actively sharing webcam video. Webcam video is *not* affected by the problem, but display media framerate drops to 0.1fps after ~1 minute. Also reproducible using Jitsi. * When rendering display media to an intermediate canvas at a fast interval (e.g. every 200ms) and recording the resulting captureStream(), and rendering frame information to every frame (frame number and milliseconds), the following observation can be made: (a) The output captureStream has a good frame rate, but the input (the HTMLVideoElement containing the original display stream) only gets a new frame every 10 seconds (after the first minute) (b) When testing using a non-display stream for the input HTMLVideoElement (e.g. by using a sample mp4 file), the problem does *not* occur. So this problem seems to directly affect only the stream returned by getDisplayMedia(). Committed 253769@main (c888c485b787): <https://commits.webkit.org/253769@main> Reviewed commits have been landed. Closing PR #3528 and removing active labels. |