|
|
@@ -95,10 +95,10 @@ export default class ChatRoom extends Listenable {
|
|
95
|
95
|
}
|
|
96
|
96
|
|
|
97
|
97
|
initPresenceMap() {
|
|
98
|
|
- this.presMap['to'] = this.myroomjid;
|
|
99
|
|
- this.presMap['xns'] = 'http://jabber.org/protocol/muc';
|
|
100
|
|
- this.presMap['nodes'] = [];
|
|
101
|
|
- this.presMap['nodes'].push({
|
|
|
98
|
+ this.presMap.to = this.myroomjid;
|
|
|
99
|
+ this.presMap.xns = 'http://jabber.org/protocol/muc';
|
|
|
100
|
+ this.presMap.nodes = [];
|
|
|
101
|
+ this.presMap.nodes.push({
|
|
102
|
102
|
'tagName': 'user-agent',
|
|
103
|
103
|
'value': navigator.userAgent,
|
|
104
|
104
|
'attributes': {xmlns: 'http://jitsi.org/jitmeet/user-agent'}
|
|
|
@@ -109,7 +109,7 @@ export default class ChatRoom extends Listenable {
|
|
109
|
109
|
}
|
|
110
|
110
|
|
|
111
|
111
|
updateDeviceAvailability(devices) {
|
|
112
|
|
- this.presMap['nodes'].push({
|
|
|
112
|
+ this.presMap.nodes.push({
|
|
113
|
113
|
'tagName': 'devices',
|
|
114
|
114
|
'children': [
|
|
115
|
115
|
{
|
|
|
@@ -133,7 +133,7 @@ export default class ChatRoom extends Listenable {
|
|
133
|
133
|
}
|
|
134
|
134
|
|
|
135
|
135
|
sendPresence(fromJoin) {
|
|
136
|
|
- var to = this.presMap['to'];
|
|
|
136
|
+ var to = this.presMap.to;
|
|
137
|
137
|
if (!to || (!this.joined && !fromJoin)) {
|
|
138
|
138
|
// Too early to send presence - not initialized
|
|
139
|
139
|
return;
|
|
|
@@ -147,7 +147,7 @@ export default class ChatRoom extends Listenable {
|
|
147
|
147
|
// as joining, and server can send us the message history for the room on
|
|
148
|
148
|
// every presence
|
|
149
|
149
|
if (fromJoin) {
|
|
150
|
|
- pres.c('x', {xmlns: this.presMap['xns']});
|
|
|
150
|
+ pres.c('x', {xmlns: this.presMap.xns});
|
|
151
|
151
|
|
|
152
|
152
|
if (this.password) {
|
|
153
|
153
|
pres.c('password').t(this.password).up();
|
|
|
@@ -774,14 +774,14 @@ export default class ChatRoom extends Listenable {
|
|
774
|
774
|
const videoTypeNode = filterNodeFromPresenceJSON(pres, 'videoType');
|
|
775
|
775
|
|
|
776
|
776
|
if(videoTypeNode.length > 0) {
|
|
777
|
|
- data.videoType = videoTypeNode[0]['value'];
|
|
|
777
|
+ data.videoType = videoTypeNode[0].value;
|
|
778
|
778
|
}
|
|
779
|
779
|
} else {
|
|
780
|
780
|
logger.error('Unsupported media type: ' + mediaType);
|
|
781
|
781
|
return null;
|
|
782
|
782
|
}
|
|
783
|
783
|
|
|
784
|
|
- data.muted = mutedNode.length > 0 && mutedNode[0]['value'] === 'true';
|
|
|
784
|
+ data.muted = mutedNode.length > 0 && mutedNode[0].value === 'true';
|
|
785
|
785
|
|
|
786
|
786
|
return data;
|
|
787
|
787
|
}
|