Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: eabe0e789567841faec0d0de50d62014448ad315
      
https://github.com/WebKit/WebKit/commit/eabe0e789567841faec0d0de50d62014448ad315
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2025-03-13 (Thu, 13 Mar 2025)

  Changed paths:
    A LayoutTests/media/video-preload-after-user-gesture-expected.txt
    A LayoutTests/media/video-preload-after-user-gesture.html
    M Source/WebCore/html/HTMLMediaElement.cpp

  Log Message:
  -----------
  [iPhone] Adjusting video resolution on Wikipedia causes the video to go black
https://bugs.webkit.org/show_bug.cgi?id=289665
rdar://146443679

Reviewed by Youenn Fablet.

On iPhone, an additional restriction exists that prevents the readyState to
move past `HAVE_METADATA`.
Wikipedia to change resolution simply set the mediaElement's `src` attribute
to another video, it never calls `play()` again expecting the video playback
to autonatically resume once the new video has been loaded, just like it
does on all other platforms.

For now remove `AutoPreloadingNotPermitted` restriction once a user has
interacted with the media element via a gesture.
In a follow-up change will remove this restriction altogether, while it
would have made sense when it was first introduced over 11 years ago,
today with MediaSource now available on iPhone and networks being what they are
it makes little sense to try to prevent loading past the metadata.

Test added to ensure that if a video has played following a user gesture
that if a new source is loaded we will reach readyState = HAVE_DATA.

* LayoutTests/media/video-preload-after-user-gesture-expected.txt: Added.
* LayoutTests/media/video-preload-after-user-gesture.html: Added.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removeBehaviorRestrictionsAfterFirstUserGesture):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to