Browse Source

fix(iFrame): Make resizeLargeVideo only available on web

j8
Jaya Allamsetty 5 years ago
parent
commit
794713b930
No account linked to committer's email address

+ 1
- 1
modules/UI/videolayout/LargeVideoManager.js View File

@@ -15,7 +15,7 @@ import { VIDEO_TYPE } from '../../../react/features/base/media';
15 15
 import { CHAT_SIZE } from '../../../react/features/chat';
16 16
 import {
17 17
     updateKnownLargeVideoResolution
18
-} from '../../../react/features/large-video';
18
+} from '../../../react/features/large-video/actions';
19 19
 import { PresenceLabel } from '../../../react/features/presence-status';
20 20
 /* eslint-enable no-unused-vars */
21 21
 import UIEvents from '../../../service/UI/UIEvents';

react/features/large-video/actions.js → react/features/large-video/actions.any.js View File

@@ -2,7 +2,6 @@
2 2
 
3 3
 import type { Dispatch } from 'redux';
4 4
 
5
-import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
6 5
 import {
7 6
     createSelectParticipantFailedEvent,
8 7
     sendAnalytics
@@ -19,8 +18,6 @@ import {
19 18
     UPDATE_KNOWN_LARGE_VIDEO_RESOLUTION
20 19
 } from './actionTypes';
21 20
 
22
-declare var APP: Object;
23
-
24 21
 /**
25 22
 * Captures a screenshot of the video displayed on the large video.
26 23
 *
@@ -72,27 +69,6 @@ export function captureLargeVideoScreenshot() {
72 69
     };
73 70
 }
74 71
 
75
-/**
76
- * Resizes the large video container based on the dimensions provided.
77
- *
78
- * @param {number} width - Width that needs to be applied on the large video container.
79
- * @param {number} height - Height that needs to be applied on the large video container.
80
- * @returns {Function}
81
- */
82
-export function resizeLargeVideo(width: number, height: number) {
83
-    return (dispatch: Dispatch<any>, getState: Function) => {
84
-        const state = getState();
85
-        const largeVideo = state['features/large-video'];
86
-
87
-        if (largeVideo) {
88
-            const largeVideoContainer = VideoLayout.getLargeVideo();
89
-
90
-            largeVideoContainer.updateContainerSize(width, height);
91
-            largeVideoContainer.resize();
92
-        }
93
-    };
94
-}
95
-
96 72
 /**
97 73
  * Signals conference to select a participant.
98 74
  *

+ 3
- 0
react/features/large-video/actions.native.js View File

@@ -0,0 +1,3 @@
1
+// @flow
2
+
3
+export * from './actions.any';

+ 28
- 0
react/features/large-video/actions.web.js View File

@@ -0,0 +1,28 @@
1
+// @flow
2
+
3
+import type { Dispatch } from 'redux';
4
+
5
+import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
6
+
7
+export * from './actions.any';
8
+
9
+/**
10
+ * Resizes the large video container based on the dimensions provided.
11
+ *
12
+ * @param {number} width - Width that needs to be applied on the large video container.
13
+ * @param {number} height - Height that needs to be applied on the large video container.
14
+ * @returns {Function}
15
+ */
16
+export function resizeLargeVideo(width: number, height: number) {
17
+    return (dispatch: Dispatch<any>, getState: Function) => {
18
+        const state = getState();
19
+        const largeVideo = state['features/large-video'];
20
+
21
+        if (largeVideo) {
22
+            const largeVideoContainer = VideoLayout.getLargeVideo();
23
+
24
+            largeVideoContainer.updateContainerSize(width, height);
25
+            largeVideoContainer.resize();
26
+        }
27
+    };
28
+}

+ 1
- 1
react/features/video-layout/subscriber.js View File

@@ -5,7 +5,7 @@ import debounce from 'lodash/debounce';
5 5
 import { pinParticipant, getPinnedParticipant } from '../base/participants';
6 6
 import { StateListenerRegistry, equals } from '../base/redux';
7 7
 import { isFollowMeActive } from '../follow-me';
8
-import { selectParticipant } from '../large-video';
8
+import { selectParticipant } from '../large-video/actions';
9 9
 
10 10
 import { setParticipantsWithScreenShare } from './actions';
11 11
 

Loading…
Cancel
Save