[webkit-changes] [WebKit/WebKit] 551dd1: [iOS] Paused video in the background is black when...
Jer Noble
noreply at github.com
Wed Jun 12 13:43:59 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 551dd1e139be120a9eee30241cc6ce01278fef88
https://github.com/WebKit/WebKit/commit/551dd1e139be120a9eee30241cc6ce01278fef88
Author: Jer Noble <jer.noble at apple.com>
Date: 2024-06-12 (Wed, 12 Jun 2024)
Changed paths:
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
Log Message:
-----------
[iOS] Paused video in the background is black when foregrounding app
https://bugs.webkit.org/show_bug.cgi?id=275381
rdar://121189961
Reviewed by Eric Carlson.
When moving to a background/non-visible state, the system will purge all AVSampleBufferVideoRenderers
and AVSampleBufferDisplayLayers by destorying their associated video decoders. And when the page returns
to a foreground/visible state, the paused video content is black/transparent.
Always update the current pixelbuffer when the video pauses, to ensure we always have a pixelbuffer to
display when our renderers are purged. When we are notified that our renderers require a flush to
continue decoding, set the last pixelbuffer as the contents of the AVSBDL. This ensures there is
_something_ to display when returning from the background.
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNeedsPlaceholderImage):
* Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::videoRendererDidReceiveError):
Canonical link: https://commits.webkit.org/279962@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list