This commit is contained in:
David Rowe 2017-04-10 16:47:35 +12:00
parent 6a88398e8e
commit b5bf7dc12f
2 changed files with 8 additions and 9 deletions

View file

@ -129,7 +129,6 @@
index += 1;
properties = Entities.getEntityProperties(entityIDs[index], ["name", "userData"]);
if (properties.name === ENTITY_NAME) {
// TODO: Guard against userData being non-existent or corrupt.
userData = JSON.parse(properties.userData);
isFound = (Date.now() - userData.timestamp) > ((CLAIM_CHECKS + 1) * TIMESTAMP_UPDATE_INTERVAL);
}
@ -188,7 +187,7 @@
var isPlayingRecording = false,
recordingFilename = "",
autoPlayTimer = null,
AUTOPLAY_SEARCH_INTERVAL = 2000; // TODO: Final value.
AUTOPLAY_SEARCH_INTERVAL = 5000; // TODO: Final value.
function playRecording(recording, position, orientation) {
Agent.isAvatar = true;

View file

@ -43,6 +43,11 @@
}
function isUsingToolbar() {
return ((HMD.active && Settings.getValue("hmdTabletBecomesToolbar"))
|| (!HMD.active && Settings.getValue("desktopTabletBecomesToolbar")));
}
CountdownTimer = (function () {
// Displays countdown overlay.
@ -387,11 +392,6 @@
};
}());
function usingToolbar() {
return ((HMD.active && Settings.getValue("hmdTabletBecomesToolbar"))
|| (!HMD.active && Settings.getValue("desktopTabletBecomesToolbar")));
}
function onTabletScreenChanged(type, url) {
// Open/close dialog in tablet or window.
@ -400,7 +400,7 @@
if (type === "Home" && url === HOME_URL) {
// Start countdown if using toolbar and recording is enabled.
if (usingToolbar() && isRecordingEnabled && Recorder.isIdle()) {
if (isUsingToolbar() && isRecordingEnabled && Recorder.isIdle()) {
Recorder.startCountdown();
}
isDialogDisplayed = false;
@ -446,7 +446,7 @@
tablet.emitScriptEvent(JSON.stringify({
type: EVENT_BRIDGE_TYPE,
action: USING_TOOLBAR_ACTION,
value: usingToolbar()
value: isUsingToolbar()
}));
} else if (message.action === ENABLE_RECORDING_ACTION) {
// User update "enable recording" checkbox.