瀏覽代碼

fix(iFrame): Make resizeLargeVideo only available on web

master
Jaya Allamsetty 5 年之前
父節點
當前提交
794713b930
沒有連結到貢獻者的電子郵件帳戶。

+ 1
- 1
modules/UI/videolayout/LargeVideoManager.js 查看文件

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

react/features/large-video/actions.js → react/features/large-video/actions.any.js 查看文件

2
 
2
 
3
 import type { Dispatch } from 'redux';
3
 import type { Dispatch } from 'redux';
4
 
4
 
5
-import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
6
 import {
5
 import {
7
     createSelectParticipantFailedEvent,
6
     createSelectParticipantFailedEvent,
8
     sendAnalytics
7
     sendAnalytics
19
     UPDATE_KNOWN_LARGE_VIDEO_RESOLUTION
18
     UPDATE_KNOWN_LARGE_VIDEO_RESOLUTION
20
 } from './actionTypes';
19
 } from './actionTypes';
21
 
20
 
22
-declare var APP: Object;
23
-
24
 /**
21
 /**
25
 * Captures a screenshot of the video displayed on the large video.
22
 * Captures a screenshot of the video displayed on the large video.
26
 *
23
 *
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
  * Signals conference to select a participant.
73
  * Signals conference to select a participant.
98
  *
74
  *

+ 3
- 0
react/features/large-video/actions.native.js 查看文件

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

+ 28
- 0
react/features/large-video/actions.web.js 查看文件

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 查看文件

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

Loading…
取消
儲存