Преглед изворни кода

Move Labels to Conference

j8
Bettenbuk Zoltan пре 6 година
родитељ
комит
46713cab3b

react/features/large-video/components/AbstractLabels.js → react/features/conference/components/AbstractLabels.js Прегледај датотеку


+ 3
- 0
react/features/conference/components/native/Conference.js Прегледај датотеку

@@ -28,6 +28,7 @@ import { setToolboxVisible, Toolbox } from '../../../toolbox';
28 28
 import { shouldDisplayTileView } from '../../../video-layout';
29 29
 
30 30
 import DisplayNameLabel from './DisplayNameLabel';
31
+import Labels from './Labels';
31 32
 import styles from './styles';
32 33
 
33 34
 /**
@@ -282,6 +283,8 @@ class Conference extends Component<Props> {
282 283
                     pointerEvents = 'box-none'
283 284
                     style = { styles.toolboxAndFilmstripContainer }>
284 285
 
286
+                    <Labels />
287
+
285 288
                     <Captions onPress = { this._onClick } />
286 289
 
287 290
                     <DisplayNameLabel />

react/features/large-video/components/Labels.native.js → react/features/conference/components/native/Labels.js Прегледај датотеку

@@ -4,21 +4,21 @@ import React from 'react';
4 4
 import { TouchableOpacity, View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
-import { JitsiRecordingConstants } from '../../base/lib-jitsi-meet';
8
-import {
9
-    RecordingExpandedLabel
10
-} from '../../recording';
7
+import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
11 8
 import {
12 9
     isNarrowAspectRatio,
13 10
     makeAspectRatioAware
14
-} from '../../base/responsive-ui';
15
-import { TranscribingExpandedLabel } from '../../transcribing';
16
-import { VideoQualityExpandedLabel } from '../../video-quality';
11
+} from '../../../base/responsive-ui';
12
+import {
13
+    RecordingExpandedLabel
14
+} from '../../../recording';
15
+import { TranscribingExpandedLabel } from '../../../transcribing';
16
+import { VideoQualityExpandedLabel } from '../../../video-quality';
17 17
 
18 18
 import AbstractLabels, {
19 19
     _abstractMapStateToProps,
20 20
     type Props as AbstractLabelsProps
21
-} from './AbstractLabels';
21
+} from '../AbstractLabels';
22 22
 import styles from './styles';
23 23
 
24 24
 /**

+ 26
- 0
react/features/conference/components/native/styles.js Прегледај датотеку

@@ -5,6 +5,8 @@ import {
5 5
     fixAndroidViewClipping
6 6
 } from '../../../base/styles';
7 7
 
8
+import { FILMSTRIP_SIZE } from '../../../filmstrip';
9
+
8 10
 /**
9 11
  * The styles of the feature conference.
10 12
  */
@@ -32,6 +34,30 @@ export default createStyleSheet({
32 34
         fontSize: 14
33 35
     },
34 36
 
37
+    /**
38
+     * View that contains the indicators.
39
+     */
40
+    indicatorContainer: {
41
+        flex: 1,
42
+        flexDirection: 'row',
43
+        justifyContent: 'flex-end',
44
+        margin: BoxModel.margin
45
+    },
46
+
47
+    /**
48
+     * Indicator container for wide aspect ratio.
49
+     */
50
+    indicatorContainerWide: {
51
+        marginRight: FILMSTRIP_SIZE + BoxModel.margin
52
+    },
53
+
54
+    labelWrapper: {
55
+        flexDirection: 'column',
56
+        position: 'absolute',
57
+        right: 0,
58
+        top: 0
59
+    },
60
+
35 61
     /**
36 62
      * The style of the {@link View} which expands over the whole
37 63
      * {@link Conference} area and splits it between the {@link Filmstrip} and

+ 4
- 2
react/features/conference/components/web/Conference.js Прегледај датотеку

@@ -29,6 +29,7 @@ import {
29 29
 
30 30
 import { maybeShowSuboptimalExperienceNotification } from '../../functions';
31 31
 
32
+import Labels from './Labels';
32 33
 import { default as Notice } from './Notice';
33 34
 
34 35
 declare var APP: Object;
@@ -217,8 +218,9 @@ class Conference extends Component<Props> {
217 218
                 onMouseMove = { this._onShowToolbar }>
218 219
                 <Notice />
219 220
                 <div id = 'videospace'>
220
-                    <LargeVideo
221
-                        hideVideoQualityLabel = { hideVideoQualityLabel } />
221
+                    <LargeVideo />
222
+                    { hideVideoQualityLabel
223
+                        || <Labels /> }
222 224
                     <Filmstrip filmstripOnly = { filmstripOnly } />
223 225
                 </div>
224 226
 

react/features/large-video/components/Labels.web.js → react/features/conference/components/web/Labels.js Прегледај датотеку

@@ -3,12 +3,12 @@
3 3
 import React from 'react';
4 4
 import { connect } from 'react-redux';
5 5
 
6
-import { JitsiRecordingConstants } from '../../base/lib-jitsi-meet';
6
+import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
7 7
 
8 8
 import AbstractLabels, {
9 9
     _abstractMapStateToProps as _mapStateToProps,
10 10
     type Props
11
-} from './AbstractLabels';
11
+} from '../AbstractLabels';
12 12
 
13 13
 /**
14 14
  * The type of the React {@code Component} state of {@link Labels}.

+ 0
- 2
react/features/large-video/components/LargeVideo.native.js Прегледај датотеку

@@ -6,7 +6,6 @@ import { connect } from 'react-redux';
6 6
 import { ParticipantView } from '../../base/participants';
7 7
 import { DimensionsDetector } from '../../base/responsive-ui';
8 8
 
9
-import Labels from './Labels';
10 9
 import styles, { AVATAR_SIZE } from './styles';
11 10
 
12 11
 /**
@@ -130,7 +129,6 @@ class LargeVideo extends Component<Props, State> {
130 129
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
131 130
                     zOrder = { 0 }
132 131
                     zoomEnabled = { true } />
133
-                <Labels />
134 132
             </DimensionsDetector>
135 133
         );
136 134
     }

+ 1
- 16
react/features/large-video/components/LargeVideo.web.js Прегледај датотеку

@@ -5,28 +5,15 @@ import React, { Component } from 'react';
5 5
 import { Watermarks } from '../../base/react';
6 6
 import { Captions } from '../../subtitles/';
7 7
 
8
-import Labels from './Labels';
9
-
10 8
 declare var interfaceConfig: Object;
11 9
 
12
-/**
13
- * The type of the React {@code Component} props of {@link LargeVideo}.
14
- */
15
-type Props = {
16
-
17
-    /**
18
-     * True if the {@code VideoQualityLabel} should not be displayed.
19
-     */
20
-    hideVideoQualityLabel: boolean
21
-};
22
-
23 10
 /**
24 11
  * Implements a React {@link Component} which represents the large video (a.k.a.
25 12
  * the conference participant who is on the local stage) on Web/React.
26 13
  *
27 14
  * @extends Component
28 15
  */
29
-export default class LargeVideo extends Component<Props> {
16
+export default class LargeVideo extends Component<{}> {
30 17
     /**
31 18
      * Implements React's {@link Component#render()}.
32 19
      *
@@ -74,8 +61,6 @@ export default class LargeVideo extends Component<Props> {
74 61
                 { interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES
75 62
                     || <Captions /> }
76 63
                 <span id = 'localConnectionMessage' />
77
-                { this.props.hideVideoQualityLabel
78
-                    || <Labels /> }
79 64
             </div>
80 65
         );
81 66
     }

+ 1
- 30
react/features/large-video/components/styles.js Прегледај датотеку

@@ -1,7 +1,6 @@
1 1
 import { StyleSheet } from 'react-native';
2 2
 
3
-import { BoxModel, ColorPalette, createStyleSheet } from '../../base/styles';
4
-import { FILMSTRIP_SIZE } from '../../filmstrip';
3
+import { ColorPalette, createStyleSheet } from '../../base/styles';
5 4
 
6 5
 /**
7 6
  * Size for the Avatar.
@@ -10,34 +9,6 @@ export const AVATAR_SIZE = 200;
10 9
 
11 10
 export default createStyleSheet({
12 11
 
13
-    /**
14
-     * View that contains the indicators.
15
-     */
16
-    indicatorContainer: {
17
-        flex: 1,
18
-        flexDirection: 'row',
19
-        justifyContent: 'flex-end',
20
-        margin: BoxModel.margin
21
-    },
22
-
23
-    /**
24
-     * Indicator container for wide aspect ratio.
25
-     */
26
-    indicatorContainerWide: {
27
-        marginRight: FILMSTRIP_SIZE + BoxModel.margin
28
-    },
29
-
30
-    labelWrapper: {
31
-        flexDirection: 'column',
32
-        position: 'absolute',
33
-        right: 0,
34
-
35
-        // Both on Android and iOS there is the status bar which may be visible.
36
-        // On iPhone X there is the notch. In the two cases BoxModel.margin is
37
-        // not enough.
38
-        top: BoxModel.margin * 3
39
-    },
40
-
41 12
     /**
42 13
      * Large video container style.
43 14
      */

Loading…
Откажи
Сачувај