Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
ref(large-video): move layout update on stream removal to layout middleware
Leonard Kimc7954c284ddf
diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex 4a3144bf56..4f42cfd879 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -258,12 +258,6 @@ UI.addLocalStream = track => {}};-/**- * Removed remote stream from UI.- * @param {JitsiTrack} track stream to remove- */-UI.removeRemoteStream = track => VideoLayout.onRemoteStreamRemoved(track);-/*** Setup and show Etherpad.* @param {string} name etherpad iddiff --git a/react/features/base/tracks/middleware.js b/react/features/base/tracks/middleware.jsindex e88b480993..87dfcefea0 100644--- a/react/features/base/tracks/middleware.js+++ b/react/features/base/tracks/middleware.js@@ -15,7 +15,6 @@ import UIEvents from '../../../../service/UI/UIEvents';import { createLocalTracksA } from './actions';import {TOGGLE_SCREENSHARING,- TRACK_REMOVED,TRACK_UPDATED} from './actionTypes';import { getLocalTrack, setTrackMuted } from './functions';@@ -92,14 +91,6 @@ MiddlewareRegistry.register(store => next => action => {}break;- case TRACK_REMOVED:- // TODO Remove this middleware case once all UI interested in tracks- // being removed are converted to react and listening for store changes.- if (typeof APP !== 'undefined' && !action.track.local) {- APP.UI.removeRemoteStream(action.track.jitsiTrack);- }- break;-case TRACK_UPDATED:// TODO Remove the following calls to APP.UI once components interested// in track mute changes are moved into React and/or redux.diff --git a/react/features/video-layout/middleware.web.js b/react/features/video-layout/middleware.web.jsindex b39a02dc23..e1e3513f1a 100644--- a/react/features/video-layout/middleware.web.js+++ b/react/features/video-layout/middleware.web.js@@ -12,7 +12,7 @@ import {getParticipantById} from '../base/participants';import { MiddlewareRegistry } from '../base/redux';-import { TRACK_ADDED } from '../base/tracks';+import { TRACK_ADDED, TRACK_REMOVED } from '../base/tracks';import { SET_FILMSTRIP_VISIBLE } from '../filmstrip';import './middleware.any';@@ -83,6 +83,12 @@ MiddlewareRegistry.register(store => next => action => {VideoLayout.onRemoteStreamAdded(action.track.jitsiTrack);}+ break;+ case TRACK_REMOVED:+ if (!action.track.local) {+ VideoLayout.onRemoteStreamRemoved(action.track.jitsiTrack);+ }+break;}