Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[macOS] Screen recording in background tab only works for about 1 minute
https://bugs.webkit.org/show_bug.cgi?id=244167 rdar://problem/98966467 Reviewed by Chris Dumez and Eric Carlson. Disable app nap for processes that run DisplayCaptureSourceCocoa, in our case the UIProcess, since it uses a timer. We do so by adding a UserActivity to DisplayCaptureSourceCocoa and starting/stopping the user activity when starting/stopping the source. We also disable app nap for pages that do screen capture (previously we were only doing this for pages doing microphone or camera capture). * Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp: (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa): (WebCore::DisplayCaptureSourceCocoa::startProducingData): (WebCore::DisplayCaptureSourceCocoa::stopProducingData): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::updateActivityState): Canonical link: https://commits.webkit.org/253769@main
- Loading branch information
Showing 3 changed files with 6 additions and 1 deletion.