fix(StreamDispatcher): do nothing when resume is called when not paused

Fixes #2324
This commit is contained in:
Pascal
2018-02-19 18:17:51 +01:00
parent 77dc3aafaa
commit 05c5bdc476

View File

@@ -137,6 +137,7 @@ class StreamDispatcher extends Writable {
* Resumes playback
*/
resume() {
if (!this.pausedSince) return;
this._pausedTime += Date.now() - this.pausedSince;
this.pausedSince = null;
if (this._writeCallback) this._writeCallback();