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(etherpad) fix Etherpad closing when dominant speaker changes

Saúl Ibarra Corretgéd9f71ee238e7
diff --git a/react/features/large-video/actions.any.js b/react/features/large-video/actions.any.js
index 0c0b3f6ffb..6e45ace9fe 100644
--- a/react/features/large-video/actions.any.js
+++ b/react/features/large-video/actions.any.js
@@ -28,6 +28,12 @@ import {
export function selectParticipantInLargeVideo(participant: ?string) {
return (dispatch: Dispatch<any>, getState: Function) => {
const state = getState();
+
+ // Keep Etherpad open.
+ if (state['features/etherpad'].editing) {
+ return;
+ }
+
const participantId = participant ?? _electParticipantInLargeVideo(state);
const largeVideo = state['features/large-video'];
const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
diff --git a/react/features/large-video/middleware.js b/react/features/large-video/middleware.js
index 97141ab10b..aa5e44e8f7 100644
--- a/react/features/large-video/middleware.js
+++ b/react/features/large-video/middleware.js
@@ -13,6 +13,7 @@ import {
TRACK_ADDED,
TRACK_REMOVED
} from '../base/tracks';
+import { TOGGLE_DOCUMENT_EDITING } from '../etherpad/actionTypes';
import { selectParticipantInLargeVideo } from './actions';
import logger from './logger';
@@ -47,6 +48,7 @@ MiddlewareRegistry.register(store => next => action => {
case PARTICIPANT_JOINED:
case PARTICIPANT_LEFT:
case PIN_PARTICIPANT:
+ case TOGGLE_DOCUMENT_EDITING:
case TRACK_ADDED:
case TRACK_REMOVED:
store.dispatch(selectParticipantInLargeVideo());