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
feat(external_api) add adbility to resize the filmstrip
Bogdan Duduman0f63e560b027
diff --git a/modules/API/API.js b/modules/API/API.jsindex 28adf820bf..ac7b8fab27 100644--- a/modules/API/API.js+++ b/modules/API/API.js@@ -68,7 +68,7 @@ import {import { appendSuffix } from '../../react/features/display-name';import { isEnabled as isDropboxEnabled } from '../../react/features/dropbox';import { setMediaEncryptionKey, toggleE2EE } from '../../react/features/e2ee/actions';-import { setVolume } from '../../react/features/filmstrip';+import { resizeFilmStrip, setVolume } from '../../react/features/filmstrip/actions.web';import { invite } from '../../react/features/invite';import {selectParticipantInLargeVideo@@ -308,6 +308,16 @@ function initCommands() {sendAnalytics(createApiEvent('film.strip.toggled'));APP.UI.toggleFilmstrip();},++ /*+ * @param {Object} options - Additional details of how to perform+ * the action.+ * @param {number} options.width - width value for film strip.+ */+ 'resize-film-strip': (options = {}) => {+ sendAnalytics(createApiEvent('film.strip.resize'));+ APP.store.dispatch(resizeFilmStrip(options.width));+ },'toggle-camera': () => {if (!isToggleCameraEnabled(APP.store.getState())) {return;@@ -1787,7 +1797,7 @@ class API {/*** Notify external application that the breakout rooms changed.*- * @param {Array} rooms - Array of breakout rooms.+ * @param {Array} rooms - Array containing the breakout rooms and main room.* @returns {void}*/notifyBreakoutRoomsUpdated(rooms) {diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.jsindex 3c2661e5fa..5a31223390 100644--- a/modules/API/external/external_api.js+++ b/modules/API/external/external_api.js@@ -52,6 +52,7 @@ const commands = {pinParticipant: 'pin-participant',rejectParticipant: 'reject-participant',removeBreakoutRoom: 'remove-breakout-room',+ resizeFilmStrip: 'resize-film-strip',resizeLargeVideo: 'resize-large-video',sendChatMessage: 'send-chat-message',sendEndpointTextMessage: 'send-endpoint-text-message',diff --git a/react/features/filmstrip/actionTypes.ts b/react/features/filmstrip/actionTypes.tsindex 98a0f61a0c..6cc7971f0a 100644--- a/react/features/filmstrip/actionTypes.ts+++ b/react/features/filmstrip/actionTypes.ts@@ -1,4 +1,13 @@/**+ * The type of (redux) action which enlarges the filmstrip.+ *+ * {+ * type: RESIZE_FILMSTRIP,+ * }+ */+export const RESIZE_FILMSTRIP = 'RESIZE_FILMSTRIP';++ /*** The type of (redux) action which sets whether the filmstrip is enabled.** {diff --git a/react/features/filmstrip/actions.web.js b/react/features/filmstrip/actions.web.jsindex 0ec2351993..7e1651082e 100644--- a/react/features/filmstrip/actions.web.js+++ b/react/features/filmstrip/actions.web.js@@ -14,6 +14,7 @@ import { getMaxColumnCount } from '../video-layout';import {ADD_STAGE_PARTICIPANT,REMOVE_STAGE_PARTICIPANT,+ RESIZE_FILMSTRIP,SET_STAGE_PARTICIPANTS,SET_FILMSTRIP_WIDTH,SET_HORIZONTAL_VIEW_DIMENSIONS,@@ -62,6 +63,23 @@ import { isStageFilmstripAvailable } from './functions.web';export * from './actions.any';+/**+ * Resize the filmstrip.+ *+ * @param {number} width - Width value for filmstrip.+ *+ * @returns {{+ * type: RESIZE_FILMSTRIP,+ * width: number,+ * }}+ */+export function resizeFilmStrip(width) {+ return {+ type: RESIZE_FILMSTRIP,+ width+ };+}+/*** Sets the dimensions of the tile view grid.*diff --git a/react/features/filmstrip/middleware.web.js b/react/features/filmstrip/middleware.web.jsindex a7c3ee7072..7d6a633db8 100644--- a/react/features/filmstrip/middleware.web.js+++ b/react/features/filmstrip/middleware.web.js@@ -24,6 +24,7 @@ import {ADD_STAGE_PARTICIPANT,CLEAR_STAGE_PARTICIPANTS,REMOVE_STAGE_PARTICIPANT,+ RESIZE_FILMSTRIP,SET_MAX_STAGE_PARTICIPANTS,SET_USER_FILMSTRIP_WIDTH,TOGGLE_PIN_STAGE_PARTICIPANT@@ -142,6 +143,13 @@ MiddlewareRegistry.register(store => next => action => {VideoLayout.refreshLayout();break;}+ case RESIZE_FILMSTRIP: {+ const { width = 0 } = action;++ store.dispatch(setFilmstripWidth(width));++ break;+ }case ADD_STAGE_PARTICIPANT: {const { dispatch, getState } = store;const { participantId, pinned } = action;