Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 93a7e4a2234f0f41af7522f9fd4a833e9c8d7949
      
https://github.com/WebKit/WebKit/commit/93a7e4a2234f0f41af7522f9fd4a833e9c8d7949
  Author: Jer Noble <[email protected]>
  Date:   2025-12-11 (Thu, 11 Dec 2025)

  Changed paths:
    A LayoutTests/media/volume-activate-audio-session-expected.txt
    A LayoutTests/media/volume-activate-audio-session.html
    A LayoutTests/media/volume-sleep-disable-expected.txt
    A LayoutTests/media/volume-sleep-disable.html
    M LayoutTests/platform/glib/TestExpectations
    A LayoutTests/platform/ios/media/volume-activate-audio-session-expected.txt
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/HTMLMediaElement.h

  Log Message:
  -----------
  Media element volume changing from 0 to >0 does not activate audio session
rdar://161691743
https://bugs.webkit.org/show_bug.cgi?id=303946

Reviewed by Andy Estes.

Changing the volume of a media element does not trigger a call to the
PlatformMediaSession's canProduceAudioChanged() method. Because all call sites
that update canProduceAudioChanged() should also update the sleep disabler,
make a new private convenience method on HTMLMediaElement that does both.

Tests: media/volume-activate-audio-session.html
       media/volume-sleep-disable.html

* LayoutTests/media/volume-activate-audio-session-expected.txt: Added.
* LayoutTests/media/volume-activate-audio-session.html: Added.
* LayoutTests/media/volume-sleep-disable-expected.txt: Added.
* LayoutTests/media/volume-sleep-disable.html: Added.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didFinishInsertingNode):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::setMutedInternal):
(WebCore::HTMLMediaElement::checkForAudioAndVideo):
(WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget):
(WebCore::HTMLMediaElement::canProduceAudioChanged):
* Source/WebCore/html/HTMLMediaElement.h:

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



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

Reply via email to