diff --git a/scripts/system/html/js/record.js b/scripts/system/html/js/record.js index b2f3ce1934..4fe8e4aeb6 100644 --- a/scripts/system/html/js/record.js +++ b/scripts/system/html/js/record.js @@ -16,12 +16,14 @@ var isUsingToolbar = false, elRecordingsPlaying, elNumberOfPlayers, elLoadButton, + elRecordButton, EVENT_BRIDGE_TYPE = "record", BODY_LOADED_ACTION = "bodyLoaded", RECORDINGS_BEING_PLAYED_ACTION = "recordingsBeingPlayed", NUMBER_OF_PLAYERS_ACTION = "numberOfPlayers", STOP_PLAYING_RECORDING_ACTION = "stopPlayingRecording", - LOAD_RECORDING_ACTION = "loadRecording"; + LOAD_RECORDING_ACTION = "loadRecording", + START_RECORDING_ACTION = "startRecording"; function stopPlayingRecording(event) { var playerID = event.target.getElementsByTagName("input")[0].value; @@ -111,6 +113,14 @@ function onBodyLoaded() { })); } + elRecordButton = document.getElementById("record-button"); + elRecordButton.onclick = function () { + EventBridge.emitWebEvent(JSON.stringify({ + type: EVENT_BRIDGE_TYPE, + action: START_RECORDING_ACTION + })); + } + EventBridge.emitWebEvent(JSON.stringify({ type: EVENT_BRIDGE_TYPE, action: BODY_LOADED_ACTION diff --git a/scripts/system/html/record.html b/scripts/system/html/record.html index 6c3b0602fe..e61f803575 100644 --- a/scripts/system/html/record.html +++ b/scripts/system/html/record.html @@ -37,6 +37,9 @@