Skip to content

[players] Pre-seek next decoder to handle-in to avoid slate flash#2104

Open
frankrousseau wants to merge 1 commit into
cgwire:mainfrom
frankrousseau:fix-1019-playlist-handles-slate
Open

[players] Pre-seek next decoder to handle-in to avoid slate flash#2104
frankrousseau wants to merge 1 commit into
cgwire:mainfrom
frankrousseau:fix-1019-playlist-handles-slate

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problems

  • With handles set on a playlist, continuous playback flashed the next shot's first frame (the slate) at every shot boundary before jumping to the handle-in frame (fixes Handles in playlists not working properly #1019)
  • The hidden decoder preloading the next entity stayed parked at t=0; the seek to handle-in only happened inside playNext at switch time, so the newly-current decoder painted frame 0 until that async seek completed

Solutions

  • Pre-seek the preloading decoder to the next entity's handle-in time as soon as its source is set (in loadEntity and switchPlayers), so frame 0 is never the frame presented when the players swap
  • Feed MultiVideoViewer with a new nextHandleIn prop, computed in PlaylistPlayer from the next entity's own handle data (handles can differ per entity), and re-apply the pre-seek when the prop updates after a switch
  • Add a jsdom regression test checking the preloaded decoder is already at the handle-in time after loadEntity and re-parks on handle changes

With handles set on a playlist, the hidden decoder preloading the next
entity sat at t=0 until playNext seeked it at switch time, so the first
frame (the slate) was painted for an instant before the seek completed.
Park the preloaded decoder on the next entity's handle-in frame as soon
as it is preloaded (loadEntity, switchPlayers, and on nextHandleIn prop
updates), fed by a new nextEntityHandleIn computed in PlaylistPlayer.

Fixes cgwire#1019

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Handles in playlists not working properly

1 participant