Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5173c0afd8a33bfb469c886cc5839a1c54cd7cb7
      
https://github.com/WebKit/WebKit/commit/5173c0afd8a33bfb469c886cc5839a1c54cd7cb7
  Author: Jer Noble <[email protected]>
  Date:   2026-08-24 (Mon, 24 Aug 2026)

  Changed paths:
    M Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.cpp

  Log Message:
  -----------
  [macOS] YouTube.com audio continues to play after tab is closed
rdar://185505597
https://bugs.webkit.org/show_bug.cgi?id=322448

Reviewed by Jean-Yves Avenard and Abrar Rahman Protyasha.

User reports indicate YouTube.com audio playback is continuing under some 
circumstances, even after
the tab containing the YouTube.com page is closed. Subsequent analysis of 
users' logs reveals that
the AudioVideoRenderAVFObjC object continues playback until it runs out of 
enqueued buffers and
stalls. The teardown path inside 
RemoteAudioVideoRendererProxyManager::shutdown() is being called,
and in fact the RemoteAudioVideoRendererProxyManager itself is being destroyed. 
But if
RemoteAudioVideoRendererProxyManager is not the lone holder of the 
AudioVideoRenderer RefPtr, its
refcount will not drop to zero and audio will continue until either buffers run 
dry or the last
remaining RefPtr is destroyed.

Rather than rely on the refcount dropping to zero to end playback, explicitly 
pause() and flush
() the renderer when shutting down a player, and do the same to all outstanding 
renderers when the
Manager itself is destroyed.

* Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.cpp:
(WebKit::RemoteAudioVideoRendererProxyManager::~RemoteAudioVideoRendererProxyManager):
(WebKit::RemoteAudioVideoRendererProxyManager::shutdown):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to