Quellcode durchsuchen

feat(rn, thumbnail) Updated indicators on native (#11280)

Remove tint for participant in large view
Change pinned indicator from border to icon
On stage view move screen sharing indicator from top to bottom
On stage view show pinned indicator instead of moderator indicator
factor2
Robert Pintilii vor 3 Jahren
Ursprung
Commit
ec0e824a43
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 0
- 5
react/features/base/color-scheme/defaultScheme.js Datei anzeigen

45
     'LargeVideo': {
45
     'LargeVideo': {
46
         background: '#040404'
46
         background: '#040404'
47
     },
47
     },
48
-    'Thumbnail': {
49
-        activeParticipantHighlight: 'rgb(81, 214, 170)',
50
-        activeParticipantTint: 'rgba(49, 183, 106, 0.3)',
51
-        background: '#36383C'
52
-    },
53
     'Toolbox': {
48
     'Toolbox': {
54
         button: 'rgb(255, 255, 255)',
49
         button: 'rgb(255, 255, 255)',
55
         buttonToggled: 'rgb(38, 58, 76)',
50
         buttonToggled: 'rgb(38, 58, 76)',

+ 3
- 20
react/features/base/participants/components/ParticipantView.native.js Datei anzeigen

13
 } from '../../media';
13
 } from '../../media';
14
 import { Container, TintedView } from '../../react';
14
 import { Container, TintedView } from '../../react';
15
 import { connect } from '../../redux';
15
 import { connect } from '../../redux';
16
-import type { StyleType } from '../../styles';
17
 import { TestHint } from '../../testing/components';
16
 import { TestHint } from '../../testing/components';
18
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
19
 import { shouldRenderParticipantVideo, getParticipantById } from '../functions';
18
 import { shouldRenderParticipantVideo, getParticipantById } from '../functions';
91
      */
90
      */
92
     t: Function,
91
     t: Function,
93
 
92
 
94
-    /**
95
-     * If true, a tinting will be applied to the view, regardless of video or
96
-     * avatar is rendered.
97
-     */
98
-    tintEnabled: boolean,
99
-
100
-    /**
101
-     * The style of the tinting when applied.
102
-     */
103
-    tintStyle: StyleType,
104
-
105
     /**
93
     /**
106
      * The test hint id which can be used to locate the {@code ParticipantView}
94
      * The test hint id which can be used to locate the {@code ParticipantView}
107
      * on the jitsi-meet-torture side. If not provided, the
95
      * on the jitsi-meet-torture side. If not provided, the
193
             _renderVideo: renderVideo,
181
             _renderVideo: renderVideo,
194
             _videoTrack: videoTrack,
182
             _videoTrack: videoTrack,
195
             disableVideo,
183
             disableVideo,
196
-            onPress,
197
-            tintStyle
184
+            onPress
198
         } = this.props;
185
         } = this.props;
199
 
186
 
200
         // If the connection has problems, we will "tint" the video / avatar.
187
         // If the connection has problems, we will "tint" the video / avatar.
201
         const connectionProblem
188
         const connectionProblem
202
             = connectionStatus !== JitsiParticipantConnectionStatus.ACTIVE;
189
             = connectionStatus !== JitsiParticipantConnectionStatus.ACTIVE;
203
-        const useTint
204
-            = connectionProblem || this.props.tintEnabled;
205
 
190
 
206
         const testHintId
191
         const testHintId
207
             = this.props.testHintId
192
             = this.props.testHintId
241
                             size = { this.props.avatarSize } />
226
                             size = { this.props.avatarSize } />
242
                     </View> }
227
                     </View> }
243
 
228
 
244
-                { useTint
229
+                { connectionProblem
245
 
230
 
246
                     // If the connection has problems, tint the video / avatar.
231
                     // If the connection has problems, tint the video / avatar.
247
-                    && <TintedView
248
-                        style = {
249
-                            connectionProblem ? undefined : tintStyle } /> }
232
+                    && <TintedView /> }
250
 
233
 
251
                 { this.props.useConnectivityInfoLabel
234
                 { this.props.useConnectivityInfoLabel
252
                     && this._renderConnectionInfo(connectionStatus) }
235
                     && this._renderConnectionInfo(connectionStatus) }

+ 17
- 0
react/features/filmstrip/components/native/PinnedIndicator.js Datei anzeigen

1
+// @flow
2
+
3
+import React from 'react';
4
+
5
+import { IconPinParticipant } from '../../../base/icons';
6
+import { BaseIndicator } from '../../../base/react';
7
+
8
+/**
9
+ * Thumbnail badge for displaying if a participant is pinned.
10
+ *
11
+ * @returns {React$Element<any>}
12
+ */
13
+export default function PinnedIndicator() {
14
+    return (
15
+        <BaseIndicator icon = { IconPinParticipant } />
16
+    );
17
+}

+ 12
- 38
react/features/filmstrip/components/native/Thumbnail.js Datei anzeigen

4
 import { Image, View } from 'react-native';
4
 import { Image, View } from 'react-native';
5
 import type { Dispatch } from 'redux';
5
 import type { Dispatch } from 'redux';
6
 
6
 
7
-import { ColorSchemeRegistry } from '../../../base/color-scheme';
8
 import { MEDIA_TYPE, VIDEO_TYPE } from '../../../base/media';
7
 import { MEDIA_TYPE, VIDEO_TYPE } from '../../../base/media';
9
 import {
8
 import {
10
     PARTICIPANT_ROLE,
9
     PARTICIPANT_ROLE,
18
 } from '../../../base/participants';
17
 } from '../../../base/participants';
19
 import { Container } from '../../../base/react';
18
 import { Container } from '../../../base/react';
20
 import { connect } from '../../../base/redux';
19
 import { connect } from '../../../base/redux';
21
-import { StyleType } from '../../../base/styles';
22
 import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
20
 import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
23
 import { ConnectionIndicator } from '../../../connection-indicator';
21
 import { ConnectionIndicator } from '../../../connection-indicator';
24
 import { DisplayNameLabel } from '../../../display-name';
22
 import { DisplayNameLabel } from '../../../display-name';
32
 
30
 
33
 import AudioMutedIndicator from './AudioMutedIndicator';
31
 import AudioMutedIndicator from './AudioMutedIndicator';
34
 import ModeratorIndicator from './ModeratorIndicator';
32
 import ModeratorIndicator from './ModeratorIndicator';
33
+import PinnedIndicator from './PinnedIndicator';
35
 import RaisedHandIndicator from './RaisedHandIndicator';
34
 import RaisedHandIndicator from './RaisedHandIndicator';
36
 import ScreenShareIndicator from './ScreenShareIndicator';
35
 import ScreenShareIndicator from './ScreenShareIndicator';
37
 import styles, { AVATAR_SIZE } from './styles';
36
 import styles, { AVATAR_SIZE } from './styles';
79
      */
78
      */
80
     _participantId: string,
79
     _participantId: string,
81
 
80
 
82
-    /**
83
-     * Indicates whether the participant is displayed on the large video.
84
-     */
85
-    _participantInLargeVideo: boolean,
86
-
87
     /**
81
     /**
88
      * Indicates whether the participant is pinned or not.
82
      * Indicates whether the participant is pinned or not.
89
      */
83
      */
104
      */
98
      */
105
     _renderModeratorIndicator: boolean,
99
     _renderModeratorIndicator: boolean,
106
 
100
 
107
-    /**
108
-     * The color-schemed stylesheet of the feature.
109
-     */
110
-    _styles: StyleType,
111
-
112
-    /**
113
-     * If true, there will be no color overlay (tint) on the thumbnail
114
-     * indicating the participant associated with the thumbnail is displayed on
115
-     * large video. By default there will be a tint.
116
-     */
117
-    disableTint?: boolean,
118
-
119
     /**
101
     /**
120
      * Invoked to trigger state changes in Redux.
102
      * Invoked to trigger state changes in Redux.
121
      */
103
      */
208
             _isFakeParticipant,
190
             _isFakeParticipant,
209
             _renderModeratorIndicator: renderModeratorIndicator,
191
             _renderModeratorIndicator: renderModeratorIndicator,
210
             _participantId: participantId,
192
             _participantId: participantId,
211
-            renderDisplayName
193
+            _pinned,
194
+            renderDisplayName,
195
+            tileView
212
         } = this.props;
196
         } = this.props;
213
         const indicators = [];
197
         const indicators = [];
214
 
198
 
221
                 ] }>
205
                 ] }>
222
                 <ConnectionIndicator participantId = { participantId } />
206
                 <ConnectionIndicator participantId = { participantId } />
223
                 <RaisedHandIndicator participantId = { participantId } />
207
                 <RaisedHandIndicator participantId = { participantId } />
224
-                {isScreenShare && (
208
+                {tileView && isScreenShare && (
225
                     <View style = { styles.indicatorContainer }>
209
                     <View style = { styles.indicatorContainer }>
226
                         <ScreenShareIndicator />
210
                         <ScreenShareIndicator />
227
                     </View>
211
                     </View>
232
                 style = { styles.thumbnailIndicatorContainer }>
216
                 style = { styles.thumbnailIndicatorContainer }>
233
                 <Container style = { (audioMuted || renderModeratorIndicator) && styles.bottomIndicatorsContainer }>
217
                 <Container style = { (audioMuted || renderModeratorIndicator) && styles.bottomIndicatorsContainer }>
234
                     { audioMuted && <AudioMutedIndicator /> }
218
                     { audioMuted && <AudioMutedIndicator /> }
219
+                    { !tileView && _pinned && <PinnedIndicator />}
235
                     { renderModeratorIndicator && <ModeratorIndicator />}
220
                     { renderModeratorIndicator && <ModeratorIndicator />}
221
+                    { !tileView && isScreenShare
222
+                        && <ScreenShareIndicator />
223
+                    }
236
                 </Container>
224
                 </Container>
237
                 {
225
                 {
238
                     renderDisplayName && <DisplayNameLabel
226
                     renderDisplayName && <DisplayNameLabel
257
             _isScreenShare: isScreenShare,
245
             _isScreenShare: isScreenShare,
258
             _isFakeParticipant,
246
             _isFakeParticipant,
259
             _participantId: participantId,
247
             _participantId: participantId,
260
-            _participantInLargeVideo: participantInLargeVideo,
261
-            _pinned,
262
             _raisedHand,
248
             _raisedHand,
263
             _renderDominantSpeakerIndicator,
249
             _renderDominantSpeakerIndicator,
264
-            _styles,
265
-            disableTint,
266
             height,
250
             height,
267
             tileView
251
             tileView
268
         } = this.props;
252
         } = this.props;
281
                 onLongPress = { this._onThumbnailLongPress }
265
                 onLongPress = { this._onThumbnailLongPress }
282
                 style = { [
266
                 style = { [
283
                     styles.thumbnail,
267
                     styles.thumbnail,
284
-                    _pinned && !tileView ? _styles.thumbnailPinned : null,
285
                     styleOverrides,
268
                     styleOverrides,
286
                     _raisedHand ? styles.thumbnailRaisedHand : null,
269
                     _raisedHand ? styles.thumbnailRaisedHand : null,
287
                     _renderDominantSpeakerIndicator ? styles.thumbnailDominantSpeaker : null
270
                     _renderDominantSpeakerIndicator ? styles.thumbnailDominantSpeaker : null
295
                             avatarSize = { tileView ? AVATAR_SIZE * 1.5 : AVATAR_SIZE }
278
                             avatarSize = { tileView ? AVATAR_SIZE * 1.5 : AVATAR_SIZE }
296
                             disableVideo = { isScreenShare || _isFakeParticipant }
279
                             disableVideo = { isScreenShare || _isFakeParticipant }
297
                             participantId = { participantId }
280
                             participantId = { participantId }
298
-                            tintEnabled = { participantInLargeVideo && !disableTint }
299
-                            tintStyle = { _styles.activeThumbnailTint }
300
                             zOrder = { 1 } />
281
                             zOrder = { 1 } />
301
                         {
282
                         {
302
                             this._renderIndicators()
283
                             this._renderIndicators()
316
  * @returns {Object}
297
  * @returns {Object}
317
  */
298
  */
318
 function _mapStateToProps(state, ownProps) {
299
 function _mapStateToProps(state, ownProps) {
319
-    // We need read-only access to the state of features/large-video so that the
320
-    // filmstrip doesn't render the video of the participant who is rendered on
321
-    // the stage i.e. as a large video.
322
-    const largeVideo = state['features/large-video'];
323
     const { ownerId } = state['features/shared-video'];
300
     const { ownerId } = state['features/shared-video'];
324
     const tracks = state['features/base/tracks'];
301
     const tracks = state['features/base/tracks'];
325
-    const { participantID } = ownProps;
302
+    const { participantID, tileView } = ownProps;
326
     const participant = getParticipantByIdOrUndefined(state, participantID);
303
     const participant = getParticipantByIdOrUndefined(state, participantID);
327
     const localParticipantId = getLocalParticipant(state).id;
304
     const localParticipantId = getLocalParticipant(state).id;
328
     const id = participant?.id;
305
     const id = participant?.id;
334
     const participantCount = getParticipantCount(state);
311
     const participantCount = getParticipantCount(state);
335
     const renderDominantSpeakerIndicator = participant && participant.dominantSpeaker && participantCount > 2;
312
     const renderDominantSpeakerIndicator = participant && participant.dominantSpeaker && participantCount > 2;
336
     const _isEveryoneModerator = isEveryoneModerator(state);
313
     const _isEveryoneModerator = isEveryoneModerator(state);
337
-    const renderModeratorIndicator = !_isEveryoneModerator
314
+    const renderModeratorIndicator = tileView && !_isEveryoneModerator
338
         && participant?.role === PARTICIPANT_ROLE.MODERATOR;
315
         && participant?.role === PARTICIPANT_ROLE.MODERATOR;
339
-    const participantInLargeVideo = id === largeVideo.participantId;
340
     const { gifUrl: gifSrc } = getGifForParticipant(state, id);
316
     const { gifUrl: gifSrc } = getGifForParticipant(state, id);
341
     const mode = getGifDisplayMode(state);
317
     const mode = getGifDisplayMode(state);
342
 
318
 
347
         _isScreenShare: isScreenShare,
323
         _isScreenShare: isScreenShare,
348
         _local: participant?.local,
324
         _local: participant?.local,
349
         _localVideoOwner: Boolean(ownerId === localParticipantId),
325
         _localVideoOwner: Boolean(ownerId === localParticipantId),
350
-        _participantInLargeVideo: participantInLargeVideo,
351
         _participantId: id,
326
         _participantId: id,
352
         _pinned: participant?.pinned,
327
         _pinned: participant?.pinned,
353
         _raisedHand: hasRaisedHand(participant),
328
         _raisedHand: hasRaisedHand(participant),
354
         _renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
329
         _renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
355
-        _renderModeratorIndicator: renderModeratorIndicator,
356
-        _styles: ColorSchemeRegistry.get(state, 'Thumbnail')
330
+        _renderModeratorIndicator: renderModeratorIndicator
357
     };
331
     };
358
 }
332
 }
359
 
333
 

+ 0
- 1
react/features/filmstrip/components/native/TileView.js Datei anzeigen

263
 
263
 
264
         return (
264
         return (
265
             <Thumbnail
265
             <Thumbnail
266
-                disableTint = { true }
267
                 height = { _thumbnailHeight }
266
                 height = { _thumbnailHeight }
268
                 key = { item }
267
                 key = { item }
269
                 participantID = { item }
268
                 participantID = { item }

+ 0
- 27
react/features/filmstrip/components/native/styles.js Datei anzeigen

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
4
 import BaseTheme from '../../../base/ui/components/BaseTheme.native';
3
 import BaseTheme from '../../../base/ui/components/BaseTheme.native';
5
 import { SMALL_THUMBNAIL_SIZE } from '../../constants';
4
 import { SMALL_THUMBNAIL_SIZE } from '../../constants';
6
 
5
 
178
         resizeMode: 'contain'
177
         resizeMode: 'contain'
179
     }
178
     }
180
 };
179
 };
181
-
182
-/**
183
- * Color schemed styles for the @{code Thumbnail} component.
184
- */
185
-ColorSchemeRegistry.register('Thumbnail', {
186
-
187
-    /**
188
-     * Tinting style of the on-stage participant thumbnail.
189
-     */
190
-    activeThumbnailTint: {
191
-        backgroundColor: schemeColor('activeParticipantTint')
192
-    },
193
-
194
-    /**
195
-     * Pinned video thumbnail style.
196
-     */
197
-    thumbnailPinned: {
198
-        borderColor: schemeColor('activeParticipantHighlight'),
199
-        shadowColor: schemeColor('activeParticipantHighlight'),
200
-        shadowOffset: {
201
-            height: 5,
202
-            width: 5
203
-        },
204
-        shadowRadius: 5
205
-    }
206
-});

Laden…
Abbrechen
Speichern