Skip to content

Player: a seek that reloads keeps its target on the clock until the first frame - #1303

Merged
GLinnik21 merged 1 commit into
plxnative:mainfrom
tiper:up/transcode-seek-clock
Nov 10, 2026
Merged

GLinnik21 merged 1 commit into
plxnative:mainfrom
tiper:up/transcode-seek-clock

Conversation

@tiper

@tiper tiper commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

What changes for the viewer

After a seek that reloads the stream (a transcode seek, or a direct-play reload), the player clock showed 0:00 between the reload and the new stream's first frame, then jumped to the target. It now stays on the target, as it did before #1274.

Why

arm_open and rebase publish the target as the playhead so the HUD reads it until frames land (their own docs say so). Since #1274 the Feed's attempt facts report position_ns only once the session has presented a frame, and every reload resets that, so the HUD (hud_model, playpos_ns(ps).unwrap_or(0)) drew 0:00 for that window.

The change

  • attempt_facts (play-feed/src/feed_pump.rs) now reports the playhead when a frame was seen or it is above zero. A session reset zeroes it, and before the first frame only a seeded open (arm_open, rebase) or a seek moves it, so no new state is needed.
  • A fresh play still reports none until its first picture. A seek to exactly 0:00 reads none until its frame, as today. The timeline reporter reads the raw playhead and is unchanged.
  • Three passages that described the old rule (the is_playing doc, the heartbeat note in docs/agent-reference.md, the contract's playpos_ns audit row) now match.

Verification

  • New unit test feed_pump::tests::a_seeded_open_reports_its_target_before_the_first_frame: fails without the change (None where 120 s is expected), passes with it.
  • plx_play_feed 301 passed; plx_media lib 1973 passed; plx_media hostsim (including the transcode-seek flight tests) 2245 passed; make check-nodef clean.
  • TV: LG C1 (webOS 6.5.3), release build, seeking a transcoded item: the clock stays on the target through the reload. Not run on webOS 4.x or 5+.

…irst frame

A transcode seek's reload (Rebase) and a direct-play reload or resume
(ArmOpen) publish their target as the playhead, so the HUD reads it until
the new stream's first frame. Since plxnative#1274 the Feed's attempt facts report
a position only once the session has presented a frame, and every reload
resets that, so between the reload and its first frame the HUD read no
position and drew 0:00 before jumping to the target.

A session reset zeroes the playhead, and before the first frame only a
seeded open or a seek moves it, so the attempt facts now also report a
playhead above zero. A fresh play still reports none until its first
picture; a seek to exactly 0:00 reads none until its frame, as before.
The timeline reporter reads the raw playhead and is unchanged.

A unit test drives Rebase and ArmOpen through session resets and fails
without the change (None where 120 s is expected). Checked on an LG C1
(webOS 6.5.3) by seeking a transcoded item: the clock stays on the
target through the reload instead of dropping to 0:00.
@GLinnik21
GLinnik21 merged commit 93697ad into plxnative:main Nov 10, 2026
13 checks passed
@GLinnik21

Copy link
Copy Markdown
Collaborator

Thanks!

@tiper
tiper deleted the up/transcode-seek-clock branch November 10, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants