RESOLVED FIXED322011
REGRESSION(317782@main) An audible video element that will not be allowed to play can interrupt play in another app
https://bugs.webkit.org/show_bug.cgi?id=322011
Summary REGRESSION(317782@main) An audible video element that will not be allowed to ...
Jean-Yves Avenard [:jya]
Reported 2026-08-18 06:31:27 PDT
Following 317782@main, void MediaSessionManagerInterface::sessionCanProduceAudioChanged() unconditionally calls maybeActivateAudioSession() synchronously; with the comment: ``` // Activate synchronously so isActive() reflects the newly-audible // state immediately. The WebContent process always holds a RemoteAudioSession // (GPU process is always enabled), whose tryToSetActive sets m_active // optimistically+synchronously — so internals.audioSessionActive() (and any // 'playing'-handler read) sees the correct state without waiting for the // debounced task below, which can otherwise land after the 'playing' event. // No-op unless activeAudioSessionRequired(); redundant with the deferred call, // which coalesces at RemoteAudioSession's IPC FIFO. ``` When the element is first loaded, and not yet known to have audible content, it is allowed to play and the MediaSession state is Playing, shortly after when the metadata was loaded and readyState moved to HAVE_METADATA (having canProduceAudio() now returning true but not yet actually audible having not loaded any content to render), maybeActivateAudioSession() will activate the AudioSession only to then immediately deny playback and pause the video. This caused any other application currently playing audio on visionOS or iPadOS to be paused. We should only activate the AudioSession when the element is known to be audible *and* is allowed to play. rdar://182709192
Attachments
Jean-Yves Avenard [:jya]
Comment 1 2026-08-18 07:01:47 PDT
Jean-Yves Avenard [:jya]
Comment 2 2026-08-18 07:09:33 PDT
Jean-Yves Avenard [:jya]
Comment 3 2026-08-18 07:10:49 PDT
EWS
Comment 4 2026-08-18 16:12:51 PDT
Committed 319413@main (7fa5ab54bb88): <https://commits.webkit.org/319413@main> Reviewed commits have been landed. Closing PR #71853 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.