Skip to content

Commit

Permalink
fix(player): announcer setting state after component is destroyed (#1303
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lucacicada authored and mihar-22 committed Jun 11, 2024
1 parent 5359e80 commit 0edf188
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vidstack/src/components/aria/announcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export class MediaAnnouncer extends Component<
if (this._startedSeekingAt > 0) {
window.clearTimeout(this._seekTimer);
this._seekTimer = window.setTimeout(() => {
if (!this.scope) return;

const newTime = peek(currentTime),
seconds = Math.abs(newTime - this._startedSeekingAt);

Expand Down

0 comments on commit 0edf188

Please sign in to comment.