Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f1dfb346a714aa891912bb46f1fb3de5fd827bbe
      
https://github.com/WebKit/WebKit/commit/f1dfb346a714aa891912bb46f1fb3de5fd827bbe
  Author: Phinehas Fuachie <[email protected]>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M Source/WebCore/Modules/modern-media-controls/media/YouTubeCaptionQuirk.js

  Log Message:
  -----------
  [visionOS][Quirk] Duplicate YouTube captions after undocking from system 
environment fullscreen
https://bugs.webkit.org/show_bug.cgi?id=316035
rdar://178235422

Reviewed by Jer Noble.

YouTubeCaptionQuirk.js has a strict-mode syntax error (cue.positionAlign = = 
'center';) that
prevents the script from loading, so the in-page caption mirror has been 
inactive in native
fullscreen and PIP on every platform.

On visionOS the script is further hobbled because 
VideoPresentationModeAPIEnabled is off by
default, so video.webkitPresentationMode reads as undefined. The script never 
sees the transition
back to inline on undock, leaves the mirror text track showing with stale cues, 
and those cues
overlap YouTube's restored in-page captions.

Rather than enable VideoPresentationModeAPIEnabled on visionOS (which would 
also expose
webkitSetPresentationMode and let pages programmatically request PIP on a 
platform that doesn't
support it), feature-detect the property and fall back to the always-exposed 
read-only
video.webkitDisplayingFullscreen on visionOS.

* Source/WebCore/Modules/modern-media-controls/media/YouTubeCaptionQuirk.js:
(CaptionMirror.prototype._syncCues):
(CaptionMirror.prototype._getIsInline):
(CaptionMirror.prototype._handlePresentationModeChanged):

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



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

Reply via email to