Remove self and use this instead in conference.js
This commit is contained in:
parent
562eba8d78
commit
9ef43d1fe7
|
@ -723,8 +723,6 @@ export default {
|
||||||
* Setup interaction between conference and UI.
|
* Setup interaction between conference and UI.
|
||||||
*/
|
*/
|
||||||
_setupListeners () {
|
_setupListeners () {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
// add local streams when joined to the conference
|
// add local streams when joined to the conference
|
||||||
room.on(ConferenceEvents.CONFERENCE_JOINED, () => {
|
room.on(ConferenceEvents.CONFERENCE_JOINED, () => {
|
||||||
APP.UI.mucJoined();
|
APP.UI.mucJoined();
|
||||||
|
@ -907,7 +905,7 @@ export default {
|
||||||
APP.UI.updateLocalStats(percent, stats);
|
APP.UI.updateLocalStats(percent, stats);
|
||||||
|
|
||||||
// send local stats to other users
|
// send local stats to other users
|
||||||
room.sendCommandOnce(self.commands.defaults.CONNECTION_QUALITY,
|
room.sendCommandOnce(this.commands.defaults.CONNECTION_QUALITY,
|
||||||
{
|
{
|
||||||
children: ConnectionQuality.convertToMUCStats(stats),
|
children: ConnectionQuality.convertToMUCStats(stats),
|
||||||
attributes: {
|
attributes: {
|
||||||
|
@ -918,7 +916,7 @@ export default {
|
||||||
);
|
);
|
||||||
|
|
||||||
// listen to remote stats
|
// listen to remote stats
|
||||||
room.addCommandListener(self.commands.defaults.CONNECTION_QUALITY,
|
room.addCommandListener(this.commands.defaults.CONNECTION_QUALITY,
|
||||||
(values, from) => {
|
(values, from) => {
|
||||||
ConnectionQuality.updateRemoteStats(from, values);
|
ConnectionQuality.updateRemoteStats(from, values);
|
||||||
});
|
});
|
||||||
|
@ -928,7 +926,7 @@ export default {
|
||||||
APP.UI.updateRemoteStats(id, percent, stats);
|
APP.UI.updateRemoteStats(id, percent, stats);
|
||||||
});
|
});
|
||||||
|
|
||||||
room.addCommandListener(self.commands.defaults.ETHERPAD, ({value}) => {
|
room.addCommandListener(this.commands.defaults.ETHERPAD, ({value}) => {
|
||||||
APP.UI.initEtherpad(value);
|
APP.UI.initEtherpad(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -941,9 +939,9 @@ export default {
|
||||||
|
|
||||||
APP.settings.setEmail(email);
|
APP.settings.setEmail(email);
|
||||||
APP.UI.setUserAvatar(room.myUserId(), email);
|
APP.UI.setUserAvatar(room.myUserId(), email);
|
||||||
sendEmail(self.commands.defaults.EMAIL, email);
|
sendEmail(this.commands.defaults.EMAIL, email);
|
||||||
});
|
});
|
||||||
room.addCommandListener(self.commands.defaults.EMAIL, (data) => {
|
room.addCommandListener(this.commands.defaults.EMAIL, (data) => {
|
||||||
APP.UI.setUserAvatar(data.attributes.id, data.value);
|
APP.UI.setUserAvatar(data.attributes.id, data.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1088,8 +1086,8 @@ export default {
|
||||||
// send start and stop commands once, and remove any updates
|
// send start and stop commands once, and remove any updates
|
||||||
// that had left
|
// that had left
|
||||||
if (state === 'stop' || state === 'start' || state === 'playing') {
|
if (state === 'stop' || state === 'start' || state === 'playing') {
|
||||||
room.removeCommand(self.commands.defaults.SHARED_VIDEO);
|
room.removeCommand(this.commands.defaults.SHARED_VIDEO);
|
||||||
room.sendCommandOnce(self.commands.defaults.SHARED_VIDEO, {
|
room.sendCommandOnce(this.commands.defaults.SHARED_VIDEO, {
|
||||||
value: url,
|
value: url,
|
||||||
attributes: {
|
attributes: {
|
||||||
state: state,
|
state: state,
|
||||||
|
@ -1101,8 +1099,8 @@ export default {
|
||||||
else {
|
else {
|
||||||
// in case of paused, in order to allow late users to join
|
// in case of paused, in order to allow late users to join
|
||||||
// paused
|
// paused
|
||||||
room.removeCommand(self.commands.defaults.SHARED_VIDEO);
|
room.removeCommand(this.commands.defaults.SHARED_VIDEO);
|
||||||
room.sendCommand(self.commands.defaults.SHARED_VIDEO, {
|
room.sendCommand(this.commands.defaults.SHARED_VIDEO, {
|
||||||
value: url,
|
value: url,
|
||||||
attributes: {
|
attributes: {
|
||||||
state: state,
|
state: state,
|
||||||
|
@ -1113,7 +1111,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
room.addCommandListener(
|
room.addCommandListener(
|
||||||
self.commands.defaults.SHARED_VIDEO, ({value, attributes}, id) => {
|
this.commands.defaults.SHARED_VIDEO, ({value, attributes}, id) => {
|
||||||
|
|
||||||
if (attributes.state === 'stop') {
|
if (attributes.state === 'stop') {
|
||||||
APP.UI.stopSharedVideo(id, attributes);
|
APP.UI.stopSharedVideo(id, attributes);
|
||||||
|
|
Loading…
Reference in New Issue