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(iFrame): Make resizeLargeVideo only available on web

Jaya Allamsetty794713b930ff
diff --git a/modules/UI/videolayout/LargeVideoManager.js b/modules/UI/videolayout/LargeVideoManager.js
index 98f236b390..271cd6994c 100644
--- a/modules/UI/videolayout/LargeVideoManager.js
+++ b/modules/UI/videolayout/LargeVideoManager.js
@@ -15,7 +15,7 @@ import { VIDEO_TYPE } from '../../../react/features/base/media';
import { CHAT_SIZE } from '../../../react/features/chat';
import {
updateKnownLargeVideoResolution
-} from '../../../react/features/large-video';
+} from '../../../react/features/large-video/actions';
import { PresenceLabel } from '../../../react/features/presence-status';
/* eslint-enable no-unused-vars */
import UIEvents from '../../../service/UI/UIEvents';
diff --git a/react/features/large-video/actions.js b/react/features/large-video/actions.any.js
similarity index 90%
rename from react/features/large-video/actions.js
rename to react/features/large-video/actions.any.js
index f34a8e1f0c..3f787329ca 100644
--- a/react/features/large-video/actions.js
+++ b/react/features/large-video/actions.any.js
@@ -2,7 +2,6 @@
import type { Dispatch } from 'redux';
-import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
import {
createSelectParticipantFailedEvent,
sendAnalytics
@@ -19,8 +18,6 @@ import {
UPDATE_KNOWN_LARGE_VIDEO_RESOLUTION
} from './actionTypes';
-declare var APP: Object;
-
/**
* Captures a screenshot of the video displayed on the large video.
*
@@ -72,27 +69,6 @@ export function captureLargeVideoScreenshot() {
};
}
-/**
- * Resizes the large video container based on the dimensions provided.
- *
- * @param {number} width - Width that needs to be applied on the large video container.
- * @param {number} height - Height that needs to be applied on the large video container.
- * @returns {Function}
- */
-export function resizeLargeVideo(width: number, height: number) {
- return (dispatch: Dispatch<any>, getState: Function) => {
- const state = getState();
- const largeVideo = state['features/large-video'];
-
- if (largeVideo) {
- const largeVideoContainer = VideoLayout.getLargeVideo();
-
- largeVideoContainer.updateContainerSize(width, height);
- largeVideoContainer.resize();
- }
- };
-}
-
/**
* Signals conference to select a participant.
*
diff --git a/react/features/large-video/actions.native.js b/react/features/large-video/actions.native.js
new file mode 100644
index 0000000000..7e5279fe73
--- /dev/null
+++ b/react/features/large-video/actions.native.js
@@ -0,0 +1,3 @@
+// @flow
+
+export * from './actions.any';
diff --git a/react/features/large-video/actions.web.js b/react/features/large-video/actions.web.js
new file mode 100644
index 0000000000..bf3634021e
--- /dev/null
+++ b/react/features/large-video/actions.web.js
@@ -0,0 +1,28 @@
+// @flow
+
+import type { Dispatch } from 'redux';
+
+import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
+
+export * from './actions.any';
+
+/**
+ * Resizes the large video container based on the dimensions provided.
+ *
+ * @param {number} width - Width that needs to be applied on the large video container.
+ * @param {number} height - Height that needs to be applied on the large video container.
+ * @returns {Function}
+ */
+export function resizeLargeVideo(width: number, height: number) {
+ return (dispatch: Dispatch<any>, getState: Function) => {
+ const state = getState();
+ const largeVideo = state['features/large-video'];
+
+ if (largeVideo) {
+ const largeVideoContainer = VideoLayout.getLargeVideo();
+
+ largeVideoContainer.updateContainerSize(width, height);
+ largeVideoContainer.resize();
+ }
+ };
+}
diff --git a/react/features/video-layout/subscriber.js b/react/features/video-layout/subscriber.js
index 1590e57a64..eecdfab93c 100644
--- a/react/features/video-layout/subscriber.js
+++ b/react/features/video-layout/subscriber.js
@@ -5,7 +5,7 @@ import debounce from 'lodash/debounce';
import { pinParticipant, getPinnedParticipant } from '../base/participants';
import { StateListenerRegistry, equals } from '../base/redux';
import { isFollowMeActive } from '../follow-me';
-import { selectParticipant } from '../large-video';
+import { selectParticipant } from '../large-video/actions';
import { setParticipantsWithScreenShare } from './actions';