pop up a prompt with url

This commit is contained in:
AlessandroSigna 2015-11-20 16:21:42 -08:00
parent 7069f7d6ab
commit a1053ee5a0
2 changed files with 3 additions and 5 deletions

View file

@ -82,12 +82,12 @@
print("RECORDING ENDED"); print("RECORDING ENDED");
Recording.stopRecording(); Recording.stopRecording();
isAvatarRecording = false; isAvatarRecording = false;
Recording.saveRecordingToAsset(getClipUrl); //save the clip to the asset and link a callback to get its url
var recordingFile = Window.save("Save recording to file", "./groupRecording", "Recordings (*.hfr)"); var recordingFile = Window.save("Save recording to file", "./groupRecording", "Recordings (*.hfr)");
if (!(recordingFile === "null" || recordingFile === null || recordingFile === "")) { if (!(recordingFile === "null" || recordingFile === null || recordingFile === "")) {
Recording.saveRecording(recordingFile); //save the clip locally Recording.saveRecording(recordingFile); //save the clip locally
} }
Recording.saveRecordingToAsset(getClipUrl); //save the clip to the asset and link a callback to get its url
} }
}, },

View file

@ -32,7 +32,6 @@ var TIMEOUT = 20;
var toolBar = null; var toolBar = null;
var recordIcon; var recordIcon;
var isRecording = false; var isRecording = false;
var avatarClips = [];
var performanceJSON = { "avatarClips" : [] }; var performanceJSON = { "avatarClips" : [] };
var responsesExpected = 0; var responsesExpected = 0;
var waitingForPerformanceFile = true; var waitingForPerformanceFile = true;
@ -109,7 +108,6 @@ function update(deltaTime) {
responsesExpected = 0; responsesExpected = 0;
totalWaitingTime = 0; totalWaitingTime = 0;
Script.update.disconnect(update); Script.update.disconnect(update);
avatarClips = [];
performanceJSON = { "avatarClips" : [] }; performanceJSON = { "avatarClips" : [] };
} }
} }
@ -122,8 +120,8 @@ function uploadFinished(url){
Assets.downloadData(url, function (data) { Assets.downloadData(url, function (data) {
printPerformanceJSON(JSON.parse(data)); printPerformanceJSON(JSON.parse(data));
}); });
//need to print somehow the url here //this way the master can copy the url //need to print somehow the url here this way the master can copy the url
//Window.prompt(url); Window.prompt("Performance file url: ", url);
} }
function printPerformanceJSON(obj) { function printPerformanceJSON(obj) {