Skip to content

Commit

Permalink
Make sure progress bar stops moving when pausing a desktop recording (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zmb3 authored Dec 20, 2024
1 parent 9379e8c commit ef5d450
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions web/packages/teleport/src/lib/tdp/playerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,18 @@ export class PlayerClient extends Client {
}

this.lastUpdateTime = Date.now();
this.send(JSON.stringify({ action: Action.TOGGLE_PLAY_PAUSE }));

if (this.paused) {
return;
}

if (this.isSeekingForward()) {
const next = Math.max(this.skipTimeUpdatesUntil, this.lastTimestamp);
this.scheduleNextUpdate(next);
} else {
this.scheduleNextUpdate(this.lastTimestamp);
}

this.send(JSON.stringify({ action: Action.TOGGLE_PLAY_PAUSE }));
}

// setPlaySpeed sets the playback speed of the recording.
Expand Down

0 comments on commit ef5d450

Please sign in to comment.