Skip to content

Commit 897e817

Browse files
committedMar 21, 2025
Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
2 parents 491234b + 408206a commit 897e817

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/browser/base/zen-components/ZenMediaController.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ class ZenMediaController {
221221

222222
this._currentPosition = positionState.position;
223223
this._currentDuration = positionState.duration;
224+
this._currentPlaybackRate = positionState.playbackRate;
225+
224226
this.updateMediaPosition();
225227

226228
for (const key of this.supportedKeys) {
@@ -297,6 +299,8 @@ class ZenMediaController {
297299

298300
this._currentPosition = event.position;
299301
this._currentDuration = event.duration;
302+
this._currentPlaybackRate = event.playbackRate;
303+
300304
this.updateMediaPosition();
301305
}
302306

@@ -357,7 +361,7 @@ class ZenMediaController {
357361

358362
this._mediaUpdateInterval = setInterval(() => {
359363
if (this._currentMediaController?.isPlaying) {
360-
this._currentPosition += 1;
364+
this._currentPosition += 1 * this._currentPlaybackRate;
361365
if (this._currentPosition > this._currentDuration) {
362366
this._currentPosition = this._currentDuration;
363367
}

0 commit comments

Comments
 (0)
Failed to load comments.