|
@@ -5,7 +5,7 @@ import React, { Component } from 'react';
|
5
|
5
|
import { MEDIA_TYPE } from '../../../base/media';
|
6
|
6
|
import { getLocalParticipant, getParticipantById, PARTICIPANT_ROLE } from '../../../base/participants';
|
7
|
7
|
import { connect } from '../../../base/redux';
|
8
|
|
-import { isLocalTrackMuted, isRemoteTrackMuted } from '../../../base/tracks';
|
|
8
|
+import { getTrackByMediaTypeAndParticipant, isLocalTrackMuted, isRemoteTrackMuted } from '../../../base/tracks';
|
9
|
9
|
import { getCurrentLayout, LAYOUTS } from '../../../video-layout';
|
10
|
10
|
|
11
|
11
|
import AudioMutedIndicator from './AudioMutedIndicator';
|
|
@@ -36,14 +36,14 @@ type Props = {
|
36
|
36
|
_showModeratorIndicator: Boolean,
|
37
|
37
|
|
38
|
38
|
/**
|
39
|
|
- * Indicates if the video muted indicator should be visible or not.
|
|
39
|
+ * Indicates if the screen share indicator should be visible or not.
|
40
|
40
|
*/
|
41
|
|
- _showVideoMutedIndicator: Boolean,
|
|
41
|
+ _showScreenShareIndicator: Boolean,
|
42
|
42
|
|
43
|
43
|
/**
|
44
|
|
- * Indicates if the screen share indicator should be visible or not.
|
|
44
|
+ * Indicates if the video muted indicator should be visible or not.
|
45
|
45
|
*/
|
46
|
|
- showScreenShareIndicator: Boolean,
|
|
46
|
+ _showVideoMutedIndicator: Boolean,
|
47
|
47
|
|
48
|
48
|
/**
|
49
|
49
|
* The ID of the participant for which the status bar is rendered.
|
|
@@ -68,7 +68,7 @@ class StatusIndicators extends Component<Props> {
|
68
|
68
|
_currentLayout,
|
69
|
69
|
_showAudioMutedIndicator,
|
70
|
70
|
_showModeratorIndicator,
|
71
|
|
- showScreenShareIndicator,
|
|
71
|
+ _showScreenShareIndicator,
|
72
|
72
|
_showVideoMutedIndicator
|
73
|
73
|
} = this.props;
|
74
|
74
|
let tooltipPosition;
|
|
@@ -87,7 +87,7 @@ class StatusIndicators extends Component<Props> {
|
87
|
87
|
return (
|
88
|
88
|
<div>
|
89
|
89
|
{ _showAudioMutedIndicator ? <AudioMutedIndicator tooltipPosition = { tooltipPosition } /> : null }
|
90
|
|
- { showScreenShareIndicator ? <ScreenShareIndicator tooltipPosition = { tooltipPosition } /> : null }
|
|
90
|
+ { _showScreenShareIndicator ? <ScreenShareIndicator tooltipPosition = { tooltipPosition } /> : null }
|
91
|
91
|
{ _showVideoMutedIndicator ? <VideoMutedIndicator tooltipPosition = { tooltipPosition } /> : null }
|
92
|
92
|
{ _showModeratorIndicator ? <ModeratorIndicator tooltipPosition = { tooltipPosition } /> : null }
|
93
|
93
|
</div>
|
|
@@ -116,11 +116,15 @@ function _mapStateToProps(state, ownProps) {
|
116
|
116
|
const tracks = state['features/base/tracks'];
|
117
|
117
|
let isVideoMuted = true;
|
118
|
118
|
let isAudioMuted = true;
|
|
119
|
+ let isScreenSharing = false;
|
119
|
120
|
|
120
|
121
|
if (participant?.local) {
|
121
|
122
|
isVideoMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO);
|
122
|
123
|
isAudioMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);
|
123
|
124
|
} else if (!participant?.isFakeParticipant) { // remote participants excluding shared video
|
|
125
|
+ const track = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, participantID);
|
|
126
|
+
|
|
127
|
+ isScreenSharing = typeof track !== 'undefined' && track.videoType === 'desktop';
|
124
|
128
|
isVideoMuted = isRemoteTrackMuted(tracks, MEDIA_TYPE.VIDEO, participantID);
|
125
|
129
|
isAudioMuted = isRemoteTrackMuted(tracks, MEDIA_TYPE.AUDIO, participantID);
|
126
|
130
|
}
|
|
@@ -130,6 +134,7 @@ function _mapStateToProps(state, ownProps) {
|
130
|
134
|
_showAudioMutedIndicator: isAudioMuted,
|
131
|
135
|
_showModeratorIndicator:
|
132
|
136
|
!interfaceConfig.DISABLE_FOCUS_INDICATOR && participant && participant.role === PARTICIPANT_ROLE.MODERATOR,
|
|
137
|
+ _showScreenShareIndicator: isScreenSharing,
|
133
|
138
|
_showVideoMutedIndicator: isVideoMuted
|
134
|
139
|
};
|
135
|
140
|
}
|