Bladeren bron

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é 5 jaren geleden
bovenliggende
commit
76e4929add

+ 3
- 1
react/features/conference/components/native/Conference.js Bestand weergeven

295
 
295
 
296
                     <Captions onPress = { this._onClick } />
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
                     <LonelyMeetingExperience />
302
                     <LonelyMeetingExperience />
301
 
303
 

+ 4
- 0
react/features/conference/components/native/styles.js Bestand weergeven

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

+ 1
- 1
react/features/display-name/components/native/DisplayNameLabel.js Bestand weergeven

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

+ 0
- 1
react/features/display-name/components/native/styles.js Bestand weergeven

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

+ 3
- 1
react/features/filmstrip/components/native/Thumbnail.js Bestand weergeven

157
                 tintStyle = { _styles.activeThumbnailTint }
157
                 tintStyle = { _styles.activeThumbnailTint }
158
                 zOrder = { 1 } />
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
             { renderModeratorIndicator
164
             { renderModeratorIndicator
163
                 && <View style = { styles.moderatorIndicatorContainer }>
165
                 && <View style = { styles.moderatorIndicatorContainer }>

+ 11
- 0
react/features/filmstrip/components/native/styles.js Bestand weergeven

14
  */
14
  */
15
 export default {
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
      * The style of the narrow {@link Filmstrip} version which displays
29
      * The style of the narrow {@link Filmstrip} version which displays
19
      * thumbnails in a row at the bottom of the screen.
30
      * thumbnails in a row at the bottom of the screen.

Laden…
Annuleren
Opslaan