Skip to content

Commit

Permalink
Fixed AudioStreamController & StreamController not being cleaned …
Browse files Browse the repository at this point in the history
…up (video-dev#1751)

- `onHandlerDestroying()` is overriden by said controllers but doesn't call
`super.onHandlerDestroying()` which cases the tick interval to never stop
  • Loading branch information
bwallberg authored and johnBartos committed Jun 4, 2018
1 parent d4d45d9 commit a7ca28d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controller/audio-stream-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ class AudioStreamController extends TaskLoop {

onHandlerDestroying () {
this.stopLoad();
super.onHandlerDestroying();
}

onHandlerDestroyed () {
this.state = State.STOPPED;
this.fragmentTracker = null;
super.onHandlerDestroyed();
}

// Signal that video PTS was found
Expand Down
2 changes: 2 additions & 0 deletions src/controller/stream-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ class StreamController extends TaskLoop {

onHandlerDestroying () {
this.stopLoad();
super.onHandlerDestroying();
}

onHandlerDestroyed () {
this.state = State.STOPPED;
this.fragmentTracker = null;
super.onHandlerDestroyed();
}

startLoad (startPosition) {
Expand Down

0 comments on commit a7ca28d

Please sign in to comment.