fix(playback): close legacy picture-in-picture on video replacement (#1538)

* fix(playback): close legacy picture-in-picture on video replacement

* test(playback): wait for the selected video before PiP setup

* test(playback): await changed settings before PiP navigation

* fix(playback): release legacy WebKit picture-in-picture
This commit is contained in:
4gray authored and GitHub committed 2026-09-05 14:02:55 +02:00
1 parent eba68d687e
commit 79f3f6c897
15 files changed
+581 -38

No files matched your search

+9 -2
View File
@@ -1155,7 +1155,7 @@ engine` (restart required) or
`pictureInPictureActive`/`canPictureInPicture`, and command
`togglePictureInPicture()`. HTML5, Video.js, and ArtPlayer use standard
element PiP from the adapter's attached video; shared ArtPlayer keeps vendor
`pip: false`, while preference-off native/vendor paths remain unchanged. The
`pip: false`, while preference-off native/vendor controls keep their own UI. The
capability-gated button sits before fullscreen and uses active enter/exit
semantics; entry is disabled until metadata, and the action is disabled while
an operation is pending. Embedded MPV reports capability/state false with a
@@ -1168,7 +1168,14 @@ engine` (restart required) or
serialized, and binding generation plus exact video identity protects
replacement and teardown from stale completion. Video.js Tech reset and
ArtPlayer rebuild rebind with exact-owner cleanup; HTML5 source changes on a
retained target preserve PiP.
retained target preserve PiP. Legacy HTML5/ArtPlayer teardown and Video.js
Tech replacement also release exact-owned PiP through
`web-video-picture-in-picture-lifecycle.ts`, independent of the controls
preference. A one-shot listener on the retired video closes late native/vendor
entries without retaining the host or touching another video's PiP. Legacy
WebKit presentation-mode PiP also returns the retired video to inline; its
presentation-change listener ignores fullscreen/inline events until a late
PiP entry consumes it.
Standard PiP shows the browser/OS video surface without Angular control
chrome, with browser-dependent subtitles. AirPlay, Cast, Document PiP, a PiP
keyboard shortcut, and Embedded MPV popup/native support are out of scope.