Procházet zdrojové kódy

rn,tile-view: render display name on top of participant view

Makes the tiles consistent as the participant view is equally sized and the
avatar is always centered in the tile.
master
Saúl Ibarra Corretgé před 5 roky
rodič
revize
76e4929add

+ 3
- 1
react/features/conference/components/native/Conference.js Zobrazit soubor

@@ -295,7 +295,9 @@ class Conference extends AbstractConference<Props, *> {
295 295
 
296 296
                     <Captions onPress = { this._onClick } />
297 297
 
298
-                    { _shouldDisplayTileView || <DisplayNameLabel participantId = { _largeVideoParticipantId } /> }
298
+                    { _shouldDisplayTileView || <Container style = { styles.displayNameContainer }>
299
+                        <DisplayNameLabel participantId = { _largeVideoParticipantId } />
300
+                    </Container> }
299 301
 
300 302
                     <LonelyMeetingExperience />
301 303
 

+ 4
- 0
react/features/conference/components/native/styles.js Zobrazit soubor

@@ -33,6 +33,10 @@ export default {
33 33
         flex: 1
34 34
     }),
35 35
 
36
+    displayNameContainer: {
37
+        margin: 10
38
+    },
39
+
36 40
     gradient: {
37 41
         position: 'absolute',
38 42
         top: 0,

+ 1
- 1
react/features/display-name/components/native/DisplayNameLabel.js Zobrazit soubor

@@ -73,7 +73,7 @@ function _mapStateToProps(state: Object, ownProps: Props) {
73 73
     // participant and there is no video rendered for
74 74
     // them.
75 75
     const _render = Boolean(participantId)
76
-        && localParticipant.id !== participantId
76
+        && localParticipant?.id !== participantId
77 77
         && !shouldRenderParticipantVideo(state, participantId)
78 78
         && !isFakeParticipant;
79 79
 

+ 0
- 1
react/features/display-name/components/native/styles.js Zobrazit soubor

@@ -7,7 +7,6 @@ export default {
7 7
         alignSelf: 'center',
8 8
         backgroundColor: 'rgba(28, 32, 37, 0.6)',
9 9
         borderRadius: 4,
10
-        margin: 16,
11 10
         paddingHorizontal: 16,
12 11
         paddingVertical: 4
13 12
     },

+ 3
- 1
react/features/filmstrip/components/native/Thumbnail.js Zobrazit soubor

@@ -157,7 +157,9 @@ function Thumbnail(props: Props) {
157 157
                 tintStyle = { _styles.activeThumbnailTint }
158 158
                 zOrder = { 1 } />
159 159
 
160
-            { renderDisplayName && <DisplayNameLabel participantId = { participantId } /> }
160
+            { renderDisplayName && <Container style = { styles.displayNameContainer }>
161
+                <DisplayNameLabel participantId = { participantId } />
162
+            </Container> }
161 163
 
162 164
             { renderModeratorIndicator
163 165
                 && <View style = { styles.moderatorIndicatorContainer }>

+ 11
- 0
react/features/filmstrip/components/native/styles.js Zobrazit soubor

@@ -14,6 +14,17 @@ export const AVATAR_SIZE = 50;
14 14
  */
15 15
 export default {
16 16
 
17
+    /**
18
+     * The display name container.
19
+     */
20
+    displayNameContainer: {
21
+        alignSelf: 'center',
22
+        bottom: 0,
23
+        flex: 1,
24
+        margin: 4,
25
+        position: 'absolute'
26
+    },
27
+
17 28
     /**
18 29
      * The style of the narrow {@link Filmstrip} version which displays
19 30
      * thumbnails in a row at the bottom of the screen.

Načítá se…
Zrušit
Uložit