Removes unused vars from moderatemuc.js. and fixes jshint warnings.
This commit is contained in:
parent
9d3aef2efa
commit
a0fef34a1f
|
@ -1,27 +1,20 @@
|
|||
/* global $, $iq, config, connection, Strophe, toggleAudio */
|
||||
/**
|
||||
* Moderate connection plugin.
|
||||
*/
|
||||
Strophe.addConnectionPlugin('moderate', {
|
||||
connection: null,
|
||||
roomjid: null,
|
||||
myroomjid: null,
|
||||
members: {},
|
||||
list_members: [], // so we can elect a new focus
|
||||
presMap: {},
|
||||
preziMap: {},
|
||||
joined: false,
|
||||
isOwner: false,
|
||||
init: function (conn) {
|
||||
this.connection = conn;
|
||||
|
||||
this.connection.addHandler( this.onMute.bind(this),
|
||||
'http://jitsi.org/jitmeet/audio',
|
||||
'iq',
|
||||
'set',
|
||||
null,
|
||||
null);
|
||||
this.connection.addHandler(this.onMute.bind(this),
|
||||
'http://jitsi.org/jitmeet/audio',
|
||||
'iq',
|
||||
'set',
|
||||
null,
|
||||
null);
|
||||
},
|
||||
setMute: function(jid, mute) {
|
||||
setMute: function (jid, mute) {
|
||||
var iq = $iq({to: jid, type: 'set'})
|
||||
.c('mute', {xmlns: 'http://jitsi.org/jitmeet/audio'})
|
||||
.t(mute.toString())
|
||||
|
@ -39,14 +32,14 @@ Strophe.addConnectionPlugin('moderate', {
|
|||
"participant" + '.', error);
|
||||
});
|
||||
},
|
||||
onMute: function(iq) {
|
||||
onMute: function (iq) {
|
||||
var mute = $(iq).find('mute');
|
||||
if (mute.length) {
|
||||
toggleAudio();
|
||||
}
|
||||
return true;
|
||||
},
|
||||
eject: function(jid) {
|
||||
eject: function (jid) {
|
||||
connection.jingle.terminateRemoteByJid(jid, 'kick');
|
||||
connection.emuc.kick(jid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue