app: keep the scrubber where it is when the clip pauses

Rune reads a layered clip's place from its compositor clock, and that
clock stops with playback. The first pause therefore reads zero, the
scrubber jumps to the start, and the clip draws there, which is the
black first second of a recording.

The place is the app's while the clip is paused: only a seek moves it,
and resuming reads the player again.
This commit is contained in:
vhaudiquet committed 2026-11-19 00:08:07 +01:00
1 parent ac9faba229
commit f6ccbf59bc
1 file changed
+9 -4
+9 -4
View File
@@ -231,10 +231,15 @@ fn keep_in_step(app: &mut App) {
pub fn tick(app: &mut App, tx: &mut Tx) -> bool {
let mut changed = false;
if let Some(player) = &app.review.player {
let time = player.time();
if (time - app.review.time).abs() > 0.001 {
app.review.time = time;
changed = true;
// Rune reads a layered clip's place from the compositor clock, and that clock stops with
// playback, so the first pause can read zero and send the scrubber to the start. While
// the clip is paused the place is ours: only a seek moves it.
if player.is_playing() {
let time = player.time();
if (time - app.review.time).abs() > 0.001 {
app.review.time = time;
changed = true;
}
}
if let Some(duration) = player.duration()
&& duration > 0.0