From 7526a59ae2d63c6f62d9c041693705179e752601 Mon Sep 17 00:00:00 2001 From: Massimiliano Fanciulli Date: Mon, 27 Nov 2017 18:34:38 +0100 Subject: [PATCH] Fixing play/pause/resume when in consume mode --- app/statemachine.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/statemachine.js b/app/statemachine.js index 834e55fe6..8873b9510 100755 --- a/app/statemachine.js +++ b/app/statemachine.js @@ -767,6 +767,11 @@ CoreStateMachine.prototype.syncState = function (stateService, sService) { } else if (this.currentStatus === 'pause') { this.currentStatus='play'; + if(this.isConsume) + { + this.consumeState.status='play'; + this.consumeState.seek=this.currentSeek + } this.pushState().fail(this.pushError.bind(this)); } @@ -826,6 +831,11 @@ CoreStateMachine.prototype.syncState = function (stateService, sService) { this.commandRouter.pushDebugConsoleMessage("CURRENT POSITION "+this.currentPosition); this.currentStatus = 'stop'; + if(this.isConsume) + { + this.consumeState.status='stop'; + this.consumeState.seek=0 + } //Checking repeat status if(this.currentRepeat && this.currentRepeatSingleSong) @@ -929,6 +939,12 @@ CoreStateMachine.prototype.syncState = function (stateService, sService) { } } else if (this.currentStatus === 'pause') { + if(this.isConsume) + { + this.consumeState.status='pause'; + this.consumeState.seek=this.currentSeek + } + this.pushState().fail(this.pushError.bind(this)); return this.stopPlaybackTimer();