|
@@ -161,11 +161,6 @@ export default class ChatRoom extends Listenable {
|
161
|
161
|
});
|
162
|
162
|
}
|
163
|
163
|
|
164
|
|
- // We need to broadcast 'videomuted' status from the beginning, cause
|
165
|
|
- // Jicofo makes decisions based on that. Initialize it with 'false'
|
166
|
|
- // here.
|
167
|
|
- this.addVideoInfoToPresence(false);
|
168
|
|
-
|
169
|
164
|
if (options.deploymentInfo && options.deploymentInfo.userRegion) {
|
170
|
165
|
this.presMap.nodes.push({
|
171
|
166
|
'tagName': 'region',
|
|
@@ -1419,7 +1414,7 @@ export default class ChatRoom extends Listenable {
|
1419
|
1414
|
* Adds the key to the presence map, overriding any previous value.
|
1420
|
1415
|
* @param key The key to add or replace.
|
1421
|
1416
|
* @param values The new values.
|
1422
|
|
- * @returns {boolean|null} <tt>true</tt> if the operation succeeded or <tt>false</tt> when no add or replce was
|
|
1417
|
+ * @returns {boolean|null} <tt>true</tt> if the operation succeeded or <tt>false</tt> when no add or replace was
|
1423
|
1418
|
* performed as the value was already there.
|
1424
|
1419
|
*/
|
1425
|
1420
|
addOrReplaceInPresence(key, values) {
|
|
@@ -1562,10 +1557,16 @@ export default class ChatRoom extends Listenable {
|
1562
|
1557
|
* @param mute
|
1563
|
1558
|
*/
|
1564
|
1559
|
addAudioInfoToPresence(mute) {
|
|
1560
|
+ const audioMutedTagName = 'audiomuted';
|
|
1561
|
+
|
|
1562
|
+ // we skip adding it as muted is default value
|
|
1563
|
+ if (mute && !this.getFromPresence(audioMutedTagName) && this.options.testing.enableSkipDefaultMutedState) {
|
|
1564
|
+ return false;
|
|
1565
|
+ }
|
|
1566
|
+
|
1565
|
1567
|
return this.addOrReplaceInPresence(
|
1566
|
|
- 'audiomuted',
|
|
1568
|
+ audioMutedTagName,
|
1567
|
1569
|
{
|
1568
|
|
- attributes: { 'xmlns': 'http://jitsi.org/jitmeet/audio' },
|
1569
|
1570
|
value: mute.toString()
|
1570
|
1571
|
});
|
1571
|
1572
|
}
|
|
@@ -1588,10 +1589,16 @@ export default class ChatRoom extends Listenable {
|
1588
|
1589
|
* @param mute
|
1589
|
1590
|
*/
|
1590
|
1591
|
addVideoInfoToPresence(mute) {
|
|
1592
|
+ const videoMutedTagName = 'videomuted';
|
|
1593
|
+
|
|
1594
|
+ // we skip adding it as muted is default value
|
|
1595
|
+ if (mute && !this.getFromPresence(videoMutedTagName) && this.options.testing.enableSkipDefaultMutedState) {
|
|
1596
|
+ return false;
|
|
1597
|
+ }
|
|
1598
|
+
|
1591
|
1599
|
return this.addOrReplaceInPresence(
|
1592
|
|
- 'videomuted',
|
|
1600
|
+ videoMutedTagName,
|
1593
|
1601
|
{
|
1594
|
|
- attributes: { 'xmlns': 'http://jitsi.org/jitmeet/video' },
|
1595
|
1602
|
value: mute.toString()
|
1596
|
1603
|
});
|
1597
|
1604
|
}
|