Retain "Record" button's pressed state when close and reopen dialog

This commit is contained in:
David Rowe 2017-04-13 18:41:55 +12:00
parent 45ca8438fa
commit ff42715a15
2 changed files with 11 additions and 0 deletions

View file

@ -154,6 +154,12 @@ function onScriptEventReceived(data) {
case FINISH_ON_OPEN_ACTION:
elFinishOnOpen.checked = message.value;
break;
case START_RECORDING_ACTION:
isRecording = message.value;
if (isRecording) {
elRecordButton.classList.add("pressed");
}
break;
case RECORDINGS_BEING_PLAYED_ACTION:
recordingsBeingPlayed = JSON.parse(message.value);
updateRecordings();

View file

@ -424,6 +424,11 @@
action: NUMBER_OF_PLAYERS_ACTION,
value: Player.numberOfPlayers()
}));
tablet.emitScriptEvent(JSON.stringify({
type: EVENT_BRIDGE_TYPE,
action: START_RECORDING_ACTION,
value: !Recorder.isIdle()
}));
break;
case STOP_PLAYING_RECORDING_ACTION:
// Stop the specified player.