ref(large-video): combine selectParticipant logic from web (#3266)

* ref(large-video): combine selectParticipant logic from web

Currently native/middleware/redux has its own logic for selecting a participant
on the bridge. To have the logic web respect that logic, a few changes are
needed.
- Web no longer has its own call to selectParticipant.
- To keep in line with web logic selectParticipant action should act even when
  there is no track. This makes it so that when a participant does get a track
  that the bridge will send high quality. The bridge can already handle when the
  selected participant does not have a video track.
- The timing of web is such that on joining an existing conference, a
  participant joins and the participant's tracks get updated and then the
  conference is joined. The result is selectParticipant does not get fired
  because it no-ops when there is no conference. To avoid having to make
  uncertain changes (to be lazy), update the selected participant on conference
  join as well.

* squash: update comment, pass message to error handler
This commit is contained in:
virtuacoplenny
2018-07-20 11:19:26 -07:00
committed by yanas
parent c62f761d67
commit afd2aea79c
5 changed files with 28 additions and 36 deletions

View File

@@ -960,7 +960,7 @@ const VideoLayout = {
// FIXME video type is not the same thing as container type
if (id !== currentId && videoType === VIDEO_CONTAINER_TYPE) {
eventEmitter.emit(UIEvents.SELECTED_ENDPOINT, id);
APP.API.notifyOnStageParticipantChanged(id);
}
let oldSmallVideo;