Removes unused parameters, adds documentation.
This commit is contained in:
parent
ebdd91df4e
commit
ff2b7ca921
|
@ -858,7 +858,11 @@ JingleSessionPC.prototype.sendTerminate = function (reason, text) {
|
|||
}
|
||||
};
|
||||
|
||||
JingleSessionPC.prototype.addSource = function (elem, fromJid) {
|
||||
/**
|
||||
* Handles a Jingle source-add message for this Jingle session.
|
||||
* @param elem An array of Jingle "content" elements.
|
||||
*/
|
||||
JingleSessionPC.prototype.addSource = function (elem) {
|
||||
|
||||
var self = this;
|
||||
// FIXME: dirty waiting
|
||||
|
@ -866,7 +870,7 @@ JingleSessionPC.prototype.addSource = function (elem, fromJid) {
|
|||
console.warn("addSource - localDescription not ready yet");
|
||||
setTimeout(function()
|
||||
{
|
||||
self.addSource(elem, fromJid);
|
||||
self.addSource(elem);
|
||||
},
|
||||
200
|
||||
);
|
||||
|
@ -939,14 +943,18 @@ JingleSessionPC.prototype.addSource = function (elem, fromJid) {
|
|||
});
|
||||
};
|
||||
|
||||
JingleSessionPC.prototype.removeSource = function (elem, fromJid) {
|
||||
/**
|
||||
* Handles a Jingle source-remove message for this Jingle session.
|
||||
* @param elem An array of Jingle "content" elements.
|
||||
*/
|
||||
JingleSessionPC.prototype.removeSource = function (elem) {
|
||||
|
||||
var self = this;
|
||||
// FIXME: dirty waiting
|
||||
if (!this.peerconnection.localDescription) {
|
||||
console.warn("removeSource - localDescription not ready yet");
|
||||
setTimeout(function() {
|
||||
self.removeSource(elem, fromJid);
|
||||
self.removeSource(elem);
|
||||
},
|
||||
200
|
||||
);
|
||||
|
|
|
@ -174,11 +174,11 @@ module.exports = function(XMPP, eventEmitter) {
|
|||
break;
|
||||
case 'addsource': // FIXME: proprietary, un-jingleish
|
||||
case 'source-add': // FIXME: proprietary
|
||||
sess.addSource($(iq).find('>jingle>content'), fromJid);
|
||||
sess.addSource($(iq).find('>jingle>content'));
|
||||
break;
|
||||
case 'removesource': // FIXME: proprietary, un-jingleish
|
||||
case 'source-remove': // FIXME: proprietary
|
||||
sess.removeSource($(iq).find('>jingle>content'), fromJid);
|
||||
sess.removeSource($(iq).find('>jingle>content'));
|
||||
break;
|
||||
default:
|
||||
console.warn('jingle action not implemented', action);
|
||||
|
|
Loading…
Reference in New Issue