Skip to content

Commit

Permalink
🐛 Resume progress tracking when re-connected #269 (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkih committed Apr 13, 2020
1 parent a58ca6f commit e4a1b38
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,17 @@ class MiniMediaPlayerProgress extends LitElement {
}

disconnectedCallback() {
super.disconnectedCallback();
this.resetSeek();
clearInterval(this.tracker);
this.tracker = null;
}

connectedCallback() {
super.connectedCallback();
if (this.hasProgress) {
this.trackProgress();
}
}

calcProgress(x) {
Expand Down

0 comments on commit e4a1b38

Please sign in to comment.