Skip to content

Commit

Permalink
fix(player): playback rate state not initializing correctly
Browse files Browse the repository at this point in the history
closes #1155
  • Loading branch information
mihar-22 committed Feb 15, 2024
1 parent aaf9b04 commit 231b036
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vidstack/src/providers/html/html–media-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class HTMLMediaEvents {
this._attachEventListener('emptied', this._onEmptied);
this._attachEventListener('error', this._onError);
this._attachEventListener('volumechange', this._onVolumeChange);

if (__DEV__) this._ctx.logger?.debug('attached initial media event listeners');
}

Expand All @@ -81,6 +82,7 @@ export class HTMLMediaEvents {
this._attachEventListener('progress', this._onProgress),
this._attachEventListener('stalled', this._onStalled),
this._attachEventListener('suspend', this._onSuspend),
this._attachEventListener('ratechange', this._onRateChange),
);

this._attachedLoadStart = true;
Expand All @@ -96,12 +98,12 @@ export class HTMLMediaEvents {
this._disposal.add(
this._attachEventListener('pause', this._onPause),
this._attachEventListener('playing', this._onPlaying),
this._attachEventListener('ratechange', this._onRateChange),
this._attachEventListener('seeked', this._onSeeked),
this._attachEventListener('seeking', this._onSeeking),
this._attachEventListener('ended', this._onEnded),
this._attachEventListener('waiting', this._onWaiting),
);

this._attachedCanPlay = true;
}

Expand Down

0 comments on commit 231b036

Please sign in to comment.