Stop playing when disposed

This commit is contained in:
Jordan Eldredge 2018-12-22 12:53:24 -08:00
parent 5ebd8f2be1
commit de978d92b3
2 changed files with 3 additions and 0 deletions

View file

@ -163,6 +163,8 @@ export default class ElementSource {
}
dispose() {
// TODO: Dispose subscriptions to this.audio
this.stop();
this._emitter.dispose();
}
}

View file

@ -383,6 +383,7 @@ class Winamp {
dispose() {
// TODO: Clean up store subscription in onTrackDidChange
// TODO: Every storeHas call represents a potential race condition
this.media.dispose();
this._actionEmitter.dispose();
this._disposable.dispose();
}