ref(video-layout): updates connection status when redux updates
This commit is contained in:
parent
05801711a7
commit
ec0439cbb1
|
@ -1798,12 +1798,9 @@ export default {
|
|||
|
||||
room.on(
|
||||
JitsiConferenceEvents.PARTICIPANT_CONN_STATUS_CHANGED,
|
||||
(id, connectionStatus) => {
|
||||
APP.store.dispatch(participantConnectionStatusChanged(
|
||||
id, connectionStatus));
|
||||
(id, connectionStatus) => APP.store.dispatch(
|
||||
participantConnectionStatusChanged(id, connectionStatus)));
|
||||
|
||||
APP.UI.participantConnectionStatusChanged(id);
|
||||
});
|
||||
room.on(
|
||||
JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED,
|
||||
id => APP.store.dispatch(dominantSpeakerChanged(id, room)));
|
||||
|
|
|
@ -826,15 +826,6 @@ UI.handleLastNEndpoints = function(leavingIds, enteringIds) {
|
|||
VideoLayout.onLastNEndpointsChanged(leavingIds, enteringIds);
|
||||
};
|
||||
|
||||
/**
|
||||
* Will handle notification about participant's connectivity status change.
|
||||
*
|
||||
* @param {string} id the id of remote participant(MUC jid)
|
||||
*/
|
||||
UI.participantConnectionStatusChanged = function(id) {
|
||||
VideoLayout.onParticipantConnectionStatusChanged(id);
|
||||
};
|
||||
|
||||
/**
|
||||
* Prompt user for nickname.
|
||||
*/
|
||||
|
|
|
@ -5,6 +5,7 @@ import UIEvents from '../../../service/UI/UIEvents';
|
|||
|
||||
import {
|
||||
DOMINANT_SPEAKER_CHANGED,
|
||||
PARTICIPANT_UPDATED,
|
||||
PIN_PARTICIPANT
|
||||
} from '../base/participants';
|
||||
import { MiddlewareRegistry } from '../base/redux';
|
||||
|
@ -26,6 +27,18 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
const result = next(action);
|
||||
|
||||
switch (action.type) {
|
||||
|
||||
case PARTICIPANT_UPDATED: {
|
||||
// Look for actions that triggered a change to connectionStatus. This is
|
||||
// done instead of changing the connection status change action to be
|
||||
// explicit in order to minimize changes to other code.
|
||||
if (typeof action.participant.connectionStatus !== 'undefined') {
|
||||
VideoLayout.onParticipantConnectionStatusChanged(
|
||||
action.participant.id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case DOMINANT_SPEAKER_CHANGED:
|
||||
VideoLayout.onDominantSpeakerChanged(action.participant.id);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue