studio icon indicating copy to clipboard operation
studio copied to clipboard

Fix manual looping when using the latching player.

Open defunctzombie opened this issue 3 years ago • 1 comments

User-Facing Changes Playing a file when already at the end restarts playback at the start.

When a file reaches the end of its playback the "pause" icon changes back to a "play" icon to indicate that the player is paused.

Description PR https://github.com/foxglove/studio/pull/4045 removed the resumePlay function which was responsible for seeking to the start and playing when the user wanted to continue playing from the end. This change adds that functionality back so when a user wants to "play" and playback is at the end, we seek to the start.

Unfortunately, this logic was being intercepted by logic in RepeatAdapter which would immediately try to pause playback because repeat was off. This change updates the IterablePlayer to indicate it is no longer playing when it has reached the end and removes the RepeatAdapter in favor of a message pipeline selector that correctly handles seeking to the start if repeat is enabled.

Fixes: #3899

defunctzombie avatar Aug 17 '22 02:08 defunctzombie

I could also be convinced that we need to add a new method to message pipeline (toggle repeat) or something to that effect and move the selector logic to message pipeline.

defunctzombie avatar Aug 17 '22 02:08 defunctzombie