[skip ci] captions minimize fix
This commit is contained in:
1 parent
f7c508f8db
commit
0c7bd4b3e0
5 files changed
+23
No files matched your search
@@ -937,6 +937,8 @@ function OnFullScreenChange() as void
|
||||
LogDebug("fullscreen ->", fullscreen)
|
||||
' the SponsorBlock notification rides with the player: hidden while minimized, shown when full.
|
||||
m.sponsorblock.SetVisible(fullscreen)
|
||||
' after a PiP restore the OS leaves captions blank while enableUI=false (resizing alone doesn't); suppress on minimize, release on restore to re-engage them.
|
||||
m.top.suppressCaptions = not fullscreen
|
||||
' minimized: no player UI at all. Reset any active transport (the bif/glyph clear; the underlying play/pause
|
||||
' stays as-is) and hide chrome/spinner/pause now. Fires for the minimize button, external minimize, and a
|
||||
' video that starts minimized.
|
||||
|
||||
@@ -179,6 +179,7 @@ function TestSnapshot() as object
|
||||
autoplay: m.top.autoplayAfterSeek
|
||||
bifVisible: m.bifDisplay.visible
|
||||
chromeShown: (m.chromeMode = ChromeMode.Shown or m.chromeMode = ChromeMode.FadingIn)
|
||||
suppressCaptions: m.top.suppressCaptions
|
||||
focusTarget: m.focusTarget
|
||||
focusedButton: m.focusedButton
|
||||
nudgeCount: m.top.nudgeCount
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<field id="thumbnailTiles" type="assocarray" />
|
||||
<field id="playbackSpeed" type="float" value="1.0" />
|
||||
<field id="enableUI" type="boolean" value="true" />
|
||||
<field id="suppressCaptions" type="boolean" />
|
||||
<field id="asyncStopSemantics" type="boolean" />
|
||||
<field id="notificationInterval" type="float" />
|
||||
<field id="width" type="float" />
|
||||
|
||||
@@ -373,6 +373,19 @@ namespace Tests
|
||||
end for
|
||||
end function
|
||||
|
||||
' PiP captions (regression: subtitles stopped after shrink->grow). With enableUI=false the OS leaves
|
||||
' captions blank after a PiP restore; minimize must suppress and restore must release — the
|
||||
' suppress->release refresh re-engages OS caption rendering.
|
||||
@it("PiP minimize suppresses captions; restore releases them")
|
||||
function _()
|
||||
container = m.top.container
|
||||
m.assertFalse(m.Snap().suppressCaptions, "captions shown while fullscreen")
|
||||
container.fullscreen = false
|
||||
m.assertTrue(m.Snap().suppressCaptions, "captions suppressed while minimized")
|
||||
container.fullscreen = true
|
||||
m.assertFalse(m.Snap().suppressCaptions, "captions released on restore")
|
||||
end function
|
||||
|
||||
' The PiP-toggle-after-close crash (captured on device): OnClose drops m.sponsorblock, so a leaked
|
||||
' container observer makes the next fullscreen flip crash OnFullScreenChange (&hf3 on SetVisible). The
|
||||
' fix is unobserve-on-close + the onCloseCalled guard; a regression CRASHES this test. Kept LAST in the
|
||||
|
||||
Reference in new issue
Block a user