From 79346673ed14c64c567478fabd6e9a2e6b999b35 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 25 Apr 2017 13:43:28 +1200 Subject: [PATCH] Log user activity events in record and playback scripts --- scripts/system/playRecordingAC.js | 4 ++++ scripts/system/record.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/scripts/system/playRecordingAC.js b/scripts/system/playRecordingAC.js index 35b5cbfb24..651dc4d924 100644 --- a/scripts/system/playRecordingAC.js +++ b/scripts/system/playRecordingAC.js @@ -313,6 +313,8 @@ Recording.setPlayerTime(0.0); Recording.startPlaying(); + + UserActivityLogger.logAction("playRecordingAC_play_recording"); } else { log("Failed to load recording " + recording); autoPlayTimer = Script.setTimeout(autoPlay, AUTOPLAY_ERROR_INTERVAL); // Try again later. @@ -415,6 +417,8 @@ Player.autoPlay(); sendHeartbeat(); + + UserActivityLogger.logAction("playRecordingAC_script_load"); } function tearDown() { diff --git a/scripts/system/record.js b/scripts/system/record.js index 9a7850cd38..9c8a23afb1 100644 --- a/scripts/system/record.js +++ b/scripts/system/record.js @@ -178,6 +178,7 @@ recordingState = IDLE; log("Finish recording"); + UserActivityLogger.logAction("record_finish_recording"); playSound(finishRecordingSound); Recording.stopRecording(); RecordingIndicator.hide(); @@ -496,6 +497,7 @@ value: Player.numberOfPlayers() })); updateRecordingStatus(!Recorder.isIdle()); + UserActivityLogger.logAction("record_open_dialog"); break; case STOP_PLAYING_RECORDING_ACTION: // Stop the specified player. @@ -506,6 +508,7 @@ recording = Window.browseAssets("Select Recording to Play", "recordings", "*.hfr"); if (recording) { log("Load recording " + recording); + UserActivityLogger.logAction("record_load_recording"); Player.playRecording("atp:" + recording, MyAvatar.position, MyAvatar.orientation); } break;