1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ class ZenMediaController {
221
221
222
222
this . _currentPosition = positionState . position ;
223
223
this . _currentDuration = positionState . duration ;
224
+ this . _currentPlaybackRate = positionState . playbackRate ;
225
+
224
226
this . updateMediaPosition ( ) ;
225
227
226
228
for ( const key of this . supportedKeys ) {
@@ -297,6 +299,8 @@ class ZenMediaController {
297
299
298
300
this . _currentPosition = event . position ;
299
301
this . _currentDuration = event . duration ;
302
+ this . _currentPlaybackRate = event . playbackRate ;
303
+
300
304
this . updateMediaPosition ( ) ;
301
305
}
302
306
@@ -357,7 +361,7 @@ class ZenMediaController {
357
361
358
362
this . _mediaUpdateInterval = setInterval ( ( ) => {
359
363
if ( this . _currentMediaController ?. isPlaying ) {
360
- this . _currentPosition += 1 ;
364
+ this . _currentPosition += 1 * this . _currentPlaybackRate ;
361
365
if ( this . _currentPosition > this . _currentDuration ) {
362
366
this . _currentPosition = this . _currentDuration ;
363
367
}
0 commit comments