diff options
author | Autobuilder at buildslave-ubuntu-12-32 <magnus@alkit.se> | 2013-11-04 14:48:42 (GMT) |
---|---|---|
committer | Autobuilder at buildslave-ubuntu-12-32 <magnus@alkit.se> | 2013-11-04 14:48:42 (GMT) |
commit | 8d466ce1171b78cd234d6e63d09d058888a17e2d (patch) | |
tree | 6f9c876116bbffcfe300bae7547d7654ba91af81 /apps/samples/miles/miles.js | |
parent | 492bac74e7b4d7e80cfa1fa859a4f7067e3a9910 (diff) | |
download | uscxml-8d466ce1171b78cd234d6e63d09d058888a17e2d.zip uscxml-8d466ce1171b78cd234d6e63d09d058888a17e2d.tar.gz uscxml-8d466ce1171b78cd234d6e63d09d058888a17e2d.tar.bz2 |
added miles/stop
Diffstat (limited to 'apps/samples/miles/miles.js')
-rw-r--r-- | apps/samples/miles/miles.js | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/apps/samples/miles/miles.js b/apps/samples/miles/miles.js index a340e07..1ef1c68 100644 --- a/apps/samples/miles/miles.js +++ b/apps/samples/miles/miles.js @@ -18,9 +18,11 @@ function Miles(element, params) { // private attributes var scxmlURL = "localhost:8080" var reflectorIp = "88.131.107.12" - var email = "user@smartvortex.eu"; + //var email = "user@smartvortex.eu"; + var email = "mathias"; var problemName = "webconfero"; - var remoteEmail = "other@smartvortex.eu"; + //var remoteEmail = "other@smartvortex.eu"; + var remoteEmail = "stefan"; var participants = []; // empty array var videoCompressions = [ @@ -92,10 +94,25 @@ function Miles(element, params) { } this.disconnect = function() { - self.connected = false; - hideChat(); - self.controlDropDown.dropDown.onCancel(true); - self.controlElem.replaceChild(self.connectDropDown.domNode, self.controlDropDown.domNode); + var query = ""; + query += "?reflector=" + encodeURIComponent(reflectorIp); + query += "&userid=" + encodeURIComponent(email); + query += "&session=" + encodeURIComponent(problemName); + + self.xhr.get({ + // The URL to request + url: "http://" + scxmlURL + "/miles/stop" + query, + // handleAs:"text", + error: function(err) { + console.log(err); + }, + load: function(result) { + self.connected = false; + hideChat(); + self.controlDropDown.dropDown.onCancel(true); + self.controlElem.replaceChild(self.connectDropDown.domNode, self.controlDropDown.domNode); + } + }); } var hideChat = function() { |