Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 98a09842676c3af9db9a11e6617993db076c133c
      
https://github.com/WebKit/WebKit/commit/98a09842676c3af9db9a11e6617993db076c133c
  Author: Eric Carlson <eric.carl...@apple.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt
    M LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html
    M LayoutTests/media/media-fullscreen-inline-expected.txt
    M LayoutTests/media/media-fullscreen.js
    M LayoutTests/media/playlist-inherits-user-gesture.html
    M LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html
    M LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt
    M 
LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/FullscreenManager.cpp
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm
    M 
Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html

  Log Message:
  -----------
  Use transient activation for media playback
https://bugs.webkit.org/show_bug.cgi?id=251372
rdar://103800206

Reviewed by Jer Noble.

Allow media to play when there is an active transient activation. Require and 
consume
a transient activation when video fullscreen requires a user gesture.

* LayoutTests/http/tests/media/autoplay-if-audio-is-playing-expected.txt:
* LayoutTests/http/tests/media/autoplay-if-audio-is-playing.html: Update test 
and
results as the second video is now able to play because the first was started 
with
a user gesture.
* LayoutTests/media/media-fullscreen-inline-expected.txt:
* LayoutTests/media/media-fullscreen.js:
(canplaythrough): Remove now invalid portion of the test.
* LayoutTests/platform/glib/media/media-fullscreen-inline-expected.txt:
* LayoutTests/platform/glib/media/media-fullscreen-not-in-document-expected.txt:

* LayoutTests/media/playlist-inherits-user-gesture.html:
* LayoutTests/media/restricted-audio-playback-with-multiple-settimeouts.html: 
Decrease
 transient activation time so these old tests work.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: Update test to 
account for
and test playing because of transient activation.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/autoplaying-multiple-media-elements.html

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::processingUserGestureForMedia const): Return true when 
there is an
active transient activation.

* Source/WebCore/dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::requestFullscreenForElement): Drive-by logging 
cleanup. Log
all errors.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen): Require and consume a transient 
activation
if a user gesture is required to enter fullscreen.

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to