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
Closes #42467
  • Loading branch information
zmb3 authored and github-actions committed Dec 18, 2024
1 parent 0c7c0ee commit 7b8f182
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 7b8f182

Please sign in to comment.