[Webkit-unassigned] [Bug 244167] New: Screen recording in background tab only works for about 1 minute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 21 04:17:46 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244167

            Bug ID: 244167
           Summary: Screen recording in background tab only works for
                    about 1 minute
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Intel)
                OS: macOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: modler.daniel at gmail.com

I'm currently trying and failing to workaround the following:

1. Call getDisplayMedia() to get a screen stream (Tried different fps, etc. constraints already)
2. Attach a MediaRecorder instance to it, with a timeslice of about 5000ms (but it doesn't matter a lot)
3. Put Safari in the background (minimize it)
4. Watch some video in another application or do normal work
5. After about one minute and 30 seconds, switch back to the Safari tab
6. Save the video to disk

I expect the video to contain all activity done on the system.
What happens however is that after about one minute, the framerate of the video is reduced to about one frame every 10 seconds, which is unusable for a screen recording.

I also tried to render the video to a canvas, and use HTMLCanvasElement.captureStream() instead as input to MediaRecorder.
I can get JavaScript to execute every few ms and render the video (by using a ScriptProcessorNode). (I need to use WebGL for that, due to captureStream() being black for 2d Contexts).
However, the video shows the same behaviour - there are only changes every 10 seconds after a minute.

I see this is related to some kind of background throttling. However, background throttling shouldn't be applied if MediaRecorder instances are running. 

Currently, we have to recommend our users to use a Chromium based browser for our web application, due to that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220821/ba62a03f/attachment.htm>


More information about the webkit-unassigned mailing list