Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(multi-stream) fix screenshare auto pin bug

William Liang0cf1b7e3d976
diff --git a/react/features/base/tracks/middleware.js b/react/features/base/tracks/middleware.js
index f837c3e64b..1e2eb9c126 100644
--- a/react/features/base/tracks/middleware.js
+++ b/react/features/base/tracks/middleware.js
@@ -78,6 +78,10 @@ MiddlewareRegistry.register(store => next => action => {
store.dispatch(getAvailableDevices());
}
+ // Call next before the creation of a fake screenshare participant to ensure a video track is available when
+ // the participant is auto pinned.
+ const result = next(action);
+
// The TRACK_ADDED action is dispatched when a presenter starts a screenshare. Do not create a local fake
// screenshare participant when multiple stream is not enabled.
const skipCreateFakeScreenShareParticipant = local && !getMultipleVideoSupportFeatureFlag(state);
@@ -90,7 +94,7 @@ MiddlewareRegistry.register(store => next => action => {
createFakeScreenShareParticipant(store, action);
}
- break;
+ return result;
}
case TRACK_NO_DATA_FROM_SOURCE: {
const result = next(action);