further UI fixes

This commit is contained in:
AlessandroSigna 2015-11-23 16:57:24 -08:00
parent 8f1ce6e1fb
commit 44c95c13fb
2 changed files with 8 additions and 3 deletions

View file

@ -21,6 +21,9 @@
var START_MESSAGE = "recordingStarted";
var STOP_MESSAGE = "recordingEnded";
var PARTICIPATING_MESSAGE = "participatingToRecording";
var HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
var RECORDING_ICON_URL = HIFI_PUBLIC_BUCKET + "images/tools/play.svg";
var NOT_RECORDING_ICON_URL = HIFI_PUBLIC_BUCKET + "images/tools/ac-on-off.svg";
var ICON_WIDTH = 60;
var ICON_HEIGHT = 60;
var overlay = null;
@ -65,7 +68,7 @@
print("entering in the recording area");
Messages.subscribe(MASTER_TO_CLIENTS_CHANNEL);
overlay = Overlays.addOverlay("image", {
imageURL: "http://wcdn2.dataknet.com/static/resources/icons/set49/1c828b8c.png", //waiting for the official logo
imageURL: NOT_RECORDING_ICON_URL, //waiting for the official logo
width: ICON_HEIGHT,
height: ICON_WIDTH,
x: 600,
@ -88,7 +91,7 @@
Messages.sendMessage(CLIENTS_TO_MASTER_CHANNEL, PARTICIPATING_MESSAGE); //tell to master that I'm participating
Recording.startRecording();
isAvatarRecording = true;
Overlays.editOverlay(overlay, {imageURL: "http://www.polyrythmic.org/picts/REC.png"}); //waiting for the official logo
Overlays.editOverlay(overlay, {imageURL: RECORDING_ICON_URL}); //waiting for the official logo
}
},
@ -103,7 +106,7 @@
Recording.saveRecording(recordingFile); //save the clip locally
}
Recording.saveRecordingToAsset(getClipUrl); //save the clip to the asset and link a callback to get its url
Overlays.editOverlay(overlay, {imageURL: "http://wcdn2.dataknet.com/static/resources/icons/set49/1c828b8c.png"}); //waiting for the official logo
Overlays.editOverlay(overlay, {imageURL: NOT_RECORDING_ICON_URL}); //waiting for the official logo
}
},

View file

@ -62,6 +62,7 @@ function setupToolBar() {
visible: true,
}, true, isRecording);
}
toolBar.selectTool(recordIcon, !isRecording);
function mousePressEvent(event) {
clickedOverlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });
@ -77,6 +78,7 @@ function mousePressEvent(event) {
Messages.sendMessage(MASTER_TO_CLIENTS_CHANNEL, STOP_MESSAGE);
isRecording = false;
}
toolBar.selectTool(recordIcon, !isRecording);
}
}