1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-29 04:32:15 -05:00

Wire up the xmpp jingle action

This commit is contained in:
Lance Stout 2013-10-15 19:48:16 -07:00
parent 0f7587c6bb
commit 888fd4ffce
2 changed files with 20 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/*global $*/
/*global $, app*/
"use strict";
var _ = require('underscore');
@ -35,23 +35,36 @@ module.exports = HumanView.extend({
return this;
},
handleAnswerClick: function (e) {
e.preventDefault();
var self = this;
app.api.jingle.startLocalMedia(null, function () {
self.model.jingleSession.accept();
self.model.state = 'active';
});
return false;
},
handleIgnoreClick: function (e) {
e.preventDefault();
this.model.jingleSession.end({
condition: 'decline'
});
return false;
},
handleCancelClick: function (e) {
e.preventDefault();
this.model.jingleSession.end({
condition: 'cancel'
});
return false;
},
handleEndClick: function (e) {
e.preventDefault();
this.model.jingleSession.end({
condition: 'success'
});
return false;
},
handleMuteClick: function (e) {
return false;
},
// we want to make sure we show the appropriate buttons

View File

@ -23,7 +23,7 @@
"templatizer": "0.1.2",
"underscore": "1.5.1",
"raf-component": "1.1.1",
"stanza.io": "2.5.10",
"stanza.io": "2.5.12",
"notify.js": "0.0.3",
"wildemitter": "0.0.5",
"attachmediastream": "",