|
@@ -404,40 +404,6 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
|
404
|
404
|
}
|
405
|
405
|
});
|
406
|
406
|
|
407
|
|
- chatRoom.addPresenceListener('startmuted', (data, from) => {
|
408
|
|
- // Ignore the strartmuted policy if the presence is received from self. The moderator should join with
|
409
|
|
- // available local sources and the policy needs to be applied only on users that join the call after.
|
410
|
|
- if (conference.myUserId() === from) {
|
411
|
|
- return;
|
412
|
|
- }
|
413
|
|
- const participant = conference.getParticipantById(from);
|
414
|
|
-
|
415
|
|
- if (!participant || !participant.isModerator()) {
|
416
|
|
- return;
|
417
|
|
- }
|
418
|
|
- const startAudioMuted = data.attributes.audio === 'true';
|
419
|
|
- const startVideoMuted = data.attributes.video === 'true';
|
420
|
|
-
|
421
|
|
- let updated = false;
|
422
|
|
-
|
423
|
|
- if (startAudioMuted !== conference.startMutedPolicy.audio) {
|
424
|
|
- conference.startMutedPolicy.audio = startAudioMuted;
|
425
|
|
- updated = true;
|
426
|
|
- }
|
427
|
|
-
|
428
|
|
- if (startVideoMuted !== conference.startMutedPolicy.video) {
|
429
|
|
- conference.startMutedPolicy.video = startVideoMuted;
|
430
|
|
- updated = true;
|
431
|
|
- }
|
432
|
|
-
|
433
|
|
- if (updated) {
|
434
|
|
- conference.eventEmitter.emit(
|
435
|
|
- JitsiConferenceEvents.START_MUTED_POLICY_CHANGED,
|
436
|
|
- conference.startMutedPolicy
|
437
|
|
- );
|
438
|
|
- }
|
439
|
|
- });
|
440
|
|
-
|
441
|
407
|
// Breakout rooms.
|
442
|
408
|
this.chatRoomForwarder.forward(XMPPEvents.BREAKOUT_ROOMS_MOVE_TO_ROOM,
|
443
|
409
|
JitsiConferenceEvents.BREAKOUT_ROOMS_MOVE_TO_ROOM);
|
|
@@ -445,8 +411,15 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
|
445
|
411
|
JitsiConferenceEvents.BREAKOUT_ROOMS_UPDATED);
|
446
|
412
|
|
447
|
413
|
// Room metadata.
|
448
|
|
- this.chatRoomForwarder.forward(XMPPEvents.ROOM_METADATA_UPDATED,
|
449
|
|
- JitsiConferenceEvents.METADATA_UPDATED);
|
|
414
|
+ chatRoom.addListener(XMPPEvents.ROOM_METADATA_UPDATED, metadata => {
|
|
415
|
+ if (metadata.startMuted) {
|
|
416
|
+ conference._updateStartMutedPolicy(
|
|
417
|
+ metadata.startMuted.audio || false,
|
|
418
|
+ metadata.startMuted.video || false
|
|
419
|
+ );
|
|
420
|
+ }
|
|
421
|
+ conference.eventEmitter.emit(JitsiConferenceEvents.METADATA_UPDATED, metadata);
|
|
422
|
+ });
|
450
|
423
|
};
|
451
|
424
|
|
452
|
425
|
/**
|