Browse Source

avatar: render a special avatar if the user is sharing their screen

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
149e53af76
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      react/features/base/avatar/components/Avatar.js

+ 8
- 1
react/features/base/avatar/components/Avatar.js View File

178
     const { colorBase, displayName, participantId } = ownProps;
178
     const { colorBase, displayName, participantId } = ownProps;
179
     const _participant = participantId && getParticipantById(state, participantId);
179
     const _participant = participantId && getParticipantById(state, participantId);
180
     const _initialsBase = (_participant && _participant.name) || displayName;
180
     const _initialsBase = (_participant && _participant.name) || displayName;
181
+    const screenShares = state['features/video-layout'].screenShares || [];
182
+
183
+    let _loadableAvatarUrl = _participant && _participant.loadableAvatarUrl;
184
+
185
+    if (participantId && screenShares.includes(participantId)) {
186
+        _loadableAvatarUrl = 'icon://share-desktop';
187
+    }
181
 
188
 
182
     return {
189
     return {
183
         _initialsBase,
190
         _initialsBase,
184
-        _loadableAvatarUrl: _participant && _participant.loadableAvatarUrl,
191
+        _loadableAvatarUrl,
185
         colorBase: !colorBase && _participant ? _participant.id : colorBase
192
         colorBase: !colorBase && _participant ? _participant.id : colorBase
186
     };
193
     };
187
 }
194
 }

Loading…
Cancel
Save