[webkit-changes] [WebKit/WebKit] 7c93c4: [iOS] REGRESSION (266293 at main): Video automaticall...

youennf noreply at github.com
Mon Jan 15 00:41:17 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7c93c4a37091a51eae4033f2421fb0aebd36aff4
      https://github.com/WebKit/WebKit/commit/7c93c4a37091a51eae4033f2421fb0aebd36aff4
  Author: Youenn Fablet <youennf at gmail.com>
  Date:   2024-01-15 (Mon, 15 Jan 2024)

  Changed paths:
    M Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.cpp
    M Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp
    M Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.h

  Log Message:
  -----------
  [iOS] REGRESSION (266293 at main): Video automatically pauses in fullscreen when youtube.com is open in multiple tabs
https://bugs.webkit.org/show_bug.cgi?id=267451
rdar://118461093

Reviewed by Eric Carlson.

As part of 266293 at main, we changed the computation of active audio session proxies to include whether interrupted or not.
This ensured that we were activating the shared audio session in case where some audio sessions were active BUT interrupted.

This computation broke the deactivation of the shared audio session as we would end up in the case of two active audio session proxies,
but one of them, the one we want to deactivate, is interrupted.
In that case, we would wrongly deactivate the shared audio session, even though the second active audio session wants to continue playing audio.
We update this computation to only deactivate the shared audio session if there is no other active audio session proxy than the proxy we want to deactivate.

We introduce hasOtherActiveProxyThan and hasActiveNotInterruptedProxy routines to make the code clearer.
We update RemoteAudioSessionProxy::tryToSetActive to ensure its interrupted state is set back to false when activated.
This could happen in case the shared audio session is already enabled and we would just interrupt other audio session proxies.

Manually tested.

* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.cpp:
(WebKit::RemoteAudioSessionProxy::tryToSetActive):
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::hasOtherActiveProxyThan):
(WebKit::RemoteAudioSessionProxyManager::hasActiveNotInterruptedProxy):
(WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess):
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.h:

Canonical link: https://commits.webkit.org/273032@main




More information about the webkit-changes mailing list