ref(video-layout): consolidate connection status update handling (#3185)

- Instead of having 4 listeners for local connection status
  updates and 1 for remote, remove two of the redundant listeners.
- Instead of calling into 4 separate VideoLayout methods to update a
  participant's connection status, expose one handler.
This commit is contained in:
virtuacoplenny
2018-06-25 10:44:12 -07:00
committed by bbaldino
parent 2951fefef9
commit 9a06d2bf52
4 changed files with 26 additions and 86 deletions

View File

@@ -53,7 +53,8 @@ MiddlewareRegistry.register(store => next => action => {
// explicit in order to minimize changes to other code.
if (typeof action.participant.connectionStatus !== 'undefined') {
VideoLayout.onParticipantConnectionStatusChanged(
action.participant.id);
action.participant.id,
action.participant.connectionStatus);
}
break;
}