Player quality + captions controls (piped-features)

- Quality button opens a modal picker over the video: Auto at the top plus
  every rung from the HLS master's variant list (parsed in the router;
  Piped videoStreams is unreliable), virtual-focus list like the rest of
  the dev player's chrome, OK applies / Back cancels, panel auto-sizes.
- Applying a quality rebuilds the /api/hls URL with the quality filter and
  restarts at the saved position (stop->stopped-edge->play), persists to
  playback.preferred_quality, keeps the retry URL list consistent.
- Captions button toggles globalCaptionMode On/Off (+ first-track fallback
  when the OS language match finds nothing); N/A when the video has none.
- Status line above the button row: 'Quality: Auto (1080p) | Captions: On'
  tracks streamingSegment while auto ramps.
- Fix: QualityLevelsFromPiped sort crashed the /streams converter (string
  vs AA compare); replaced by QualityLevelsFromHlsMaster.
- Seam tests for picker open/navigate/apply/cancel/clamp + captions toggle;
  ButtonRow specs updated for the 4-button row. Lib tag PIPED-LIB-26.
This commit is contained in:
spaghet committed 2026-11-24 21:50:41 -05:00
1 parent b7183f3603
commit 7577f89df6
19 files changed
+887 -23

No files matched your search

@@ -18,8 +18,10 @@
<field id="focusedIndex" type="integer" value="0" />
<field id="playing" type="boolean" value="true" /> <!-- selects the play vs pause icon -->
<field id="buttonCount" type="integer" value="0" /> <!-- read-only: set in Init from m.buttons -->
<!-- pulse the focused button's scale nudge (a press that couldn't move focus: Left/Right clamped at
the row's ends, Up at the top tier). -->
<!-- current quality + captions state, shown above the clusters (fed by the coordinator). -->
<field id="statusText" type="string" alias="statusLabel.text" />
<!-- pulse the focused button's scale nudge: confirms a press that couldn't move focus (Left/Right at the row's end,
Up at the top tier). -->
<field id="nudge" type="boolean" alwaysNotify="true" />
</interface>
<children>
@@ -29,10 +31,18 @@
iconUri="pkg:/images/icons/player/play.png"
iconUri2="pkg:/images/icons/player/pause.png" />
</Group>
<!-- minimize, right-aligned to the trackbar's right edge (x=1212). -->
<!-- quality, captions, minimize, right-aligned to the trackbar's right edge (x=1212). -->
<Group id="RightCluster">
<VideoPlayerButton id="QualityButton"
iconUri="pkg:/images/icons/player/quality.png" />
<VideoPlayerButton id="CaptionsButton"
iconUri="pkg:/images/icons/player/captions.png" />
<VideoPlayerButton id="MinimizeButton"
iconUri="pkg:/images/icons/player/minimize.png" />
</Group>
<Label id="statusLabel" translation="[68,522]" width="700" height="28"
color="0xFEFEFEFF" horizAlign="left" vertAlign="bottom" wrap="false">
<Font role="font" uri="font:SystemFontFile" size="22" />
</Label>
</children>
</component>