[webkit-changes] [WebKit/WebKit] b14793: Resuming audio playing of HTMLMediaElement via Aud...
youennf
noreply at github.com
Thu May 16 05:02:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b1479358ffa916a136356f5ded70b22f22a1b7c2
https://github.com/WebKit/WebKit/commit/b1479358ffa916a136356f5ded70b22f22a1b7c2
Author: Youenn Fablet <youenn at apple.com>
Date: 2024-05-16 (Thu, 16 May 2024)
Changed paths:
A LayoutTests/webaudio/audiomix-bufferingpolicy-expected.txt
A LayoutTests/webaudio/audiomix-bufferingpolicy.html
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h
M Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
Log Message:
-----------
Resuming audio playing of HTMLMediaElement via AudioContext does not work if user switched from tab
https://bugs.webkit.org/show_bug.cgi?id=270352
rdar://123901202
Reviewed by Eric Carlson.
When switching from one tab to the other, we are setting AVPlayer resourceConservationLevelWhilePaused to AVPlayerResourceConservationLevelReuseActivePlayerResources.
When getting back to the tab, we set it back to AVPlayerResourceConservationLevelNone.
But the AVPlayer audio mix is not functional anymore.
We implement a workaround at WebKit level by recreating the audio mix if needed whenever moving out of AVPlayerResourceConservationLevelReuseActivePlayerResources.
Covered by added test.
* LayoutTests/webaudio/audiomix-bufferingpolicy-expected.txt: Added.
* LayoutTests/webaudio/audiomix-bufferingpolicy.html: Added.
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::recreateAudioMixIfNeeded):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setBufferingPolicy):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::setMediaElementelementBufferingPolicy):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
Canonical link: https://commits.webkit.org/278859@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