[webkit-changes] [WebKit/WebKit] 41855a: Opt out of playback preventing app backgrounding f...
Dean Jackson
noreply at github.com
Fri Mar 3 01:41:57 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 41855a9143871d0ff15e9880b841fd51a11164e6
https://github.com/WebKit/WebKit/commit/41855a9143871d0ff15e9880b841fd51a11164e6
Author: Dean Jackson <dino at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
Log Message:
-----------
Opt out of playback preventing app backgrounding for silent videos
https://bugs.webkit.org/show_bug.cgi?id=253163
rdar://103458234
Reviewed by Jer Noble and Eric Carlson.
AVFoundation has exposed new API on AVPlayer and AVSampleBufferDisplayLayer
to avoid silent media playback from keeping the app moving to the background.
Test for the property, then set it to NO.
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::ensureLayer):
Canonical link: https://commits.webkit.org/261128@main
More information about the webkit-changes
mailing list