|
|
@@ -1106,13 +1106,14 @@ class Thumbnail extends Component<Props, State> {
|
|
1106
|
1106
|
* @returns {ReactElement}
|
|
1107
|
1107
|
*/
|
|
1108
|
1108
|
render() {
|
|
1109
|
|
- const { _participant, _isVirtualScreenshareParticipant } = this.props;
|
|
|
1109
|
+ const { _participant, _isTestModeEnabled, _isVirtualScreenshareParticipant } = this.props;
|
|
|
1110
|
+ const videoEventListeners: any = {};
|
|
1110
|
1111
|
|
|
1111
|
1112
|
if (!_participant) {
|
|
1112
|
1113
|
return null;
|
|
1113
|
1114
|
}
|
|
1114
|
1115
|
|
|
1115
|
|
- const { isFakeParticipant, local } = _participant;
|
|
|
1116
|
+ const { isFakeParticipant, isLocalScreenShare, local } = _participant;
|
|
1116
|
1117
|
|
|
1117
|
1118
|
if (local) {
|
|
1118
|
1119
|
return this._renderParticipant(true);
|
|
|
@@ -1126,12 +1127,19 @@ class Thumbnail extends Component<Props, State> {
|
|
1126
|
1127
|
const { isHovered } = this.state;
|
|
1127
|
1128
|
const { _videoTrack, _isMobile, classes, _thumbnailType } = this.props;
|
|
1128
|
1129
|
|
|
|
1130
|
+ if (_isTestModeEnabled) {
|
|
|
1131
|
+ VIDEO_TEST_EVENTS.forEach(attribute => {
|
|
|
1132
|
+ videoEventListeners[attribute] = this._onTestingEvent;
|
|
|
1133
|
+ });
|
|
|
1134
|
+ videoEventListeners.onCanPlay = this._onCanPlay;
|
|
|
1135
|
+ }
|
|
|
1136
|
+
|
|
1129
|
1137
|
return (
|
|
1130
|
1138
|
<VirtualScreenshareParticipant
|
|
1131
|
1139
|
classes = { classes }
|
|
1132
|
1140
|
containerClassName = { this._getContainerClassName() }
|
|
1133
|
1141
|
isHovered = { isHovered }
|
|
1134
|
|
- isLocal = { local }
|
|
|
1142
|
+ isLocal = { isLocalScreenShare }
|
|
1135
|
1143
|
isMobile = { _isMobile }
|
|
1136
|
1144
|
onClick = { this._onClick }
|
|
1137
|
1145
|
onMouseEnter = { this._onMouseEnter }
|
|
|
@@ -1165,12 +1173,13 @@ function _mapStateToProps(state: IState, ownProps: any): Object {
|
|
1165
|
1173
|
const participant = getParticipantByIdOrUndefined(state, participantID);
|
|
1166
|
1174
|
const id = participant?.id;
|
|
1167
|
1175
|
const isLocal = participant?.local ?? true;
|
|
1168
|
|
- const tracks = state['features/base/tracks'];
|
|
|
1176
|
+ const multipleVideoSupportEnabled = getMultipleVideoSupportFeatureFlag(state);
|
|
1169
|
1177
|
const sourceNameSignalingEnabled = getSourceNameSignalingFeatureFlag(state);
|
|
|
1178
|
+ const tracks = state['features/base/tracks'];
|
|
1170
|
1179
|
|
|
1171
|
1180
|
let _videoTrack;
|
|
1172
|
1181
|
|
|
1173
|
|
- if (sourceNameSignalingEnabled && participant?.isVirtualScreenshareParticipant) {
|
|
|
1182
|
+ if (multipleVideoSupportEnabled && participant?.isVirtualScreenshareParticipant) {
|
|
1174
|
1183
|
_videoTrack = getVirtualScreenshareParticipantTrack(tracks, id);
|
|
1175
|
1184
|
} else {
|
|
1176
|
1185
|
_videoTrack = isLocal
|
|
|
@@ -1293,19 +1302,19 @@ function _mapStateToProps(state: IState, ownProps: any): Object {
|
|
1293
|
1302
|
_isScreenSharing: _videoTrack?.videoType === 'desktop',
|
|
1294
|
1303
|
_isTestModeEnabled: isTestModeEnabled(state),
|
|
1295
|
1304
|
_isVideoPlayable: id && isVideoPlayable(state, id),
|
|
1296
|
|
- _isVirtualScreenshareParticipant: sourceNameSignalingEnabled && participant?.isVirtualScreenshareParticipant,
|
|
|
1305
|
+ _isVirtualScreenshareParticipant: multipleVideoSupportEnabled && participant?.isVirtualScreenshareParticipant,
|
|
1297
|
1306
|
_localFlipX: Boolean(localFlipX),
|
|
1298
|
|
- _multipleVideoSupport: getMultipleVideoSupportFeatureFlag(state),
|
|
|
1307
|
+ _multipleVideoSupport: multipleVideoSupportEnabled,
|
|
1299
|
1308
|
_participant: participant,
|
|
1300
|
1309
|
_raisedHand: hasRaisedHand(participant),
|
|
|
1310
|
+ _sourceNameSignalingEnabled: sourceNameSignalingEnabled,
|
|
1301
|
1311
|
_stageFilmstripLayout: isStageFilmstripAvailable(state),
|
|
1302
|
1312
|
_stageParticipantsVisible: _currentLayout === LAYOUTS.STAGE_FILMSTRIP_VIEW,
|
|
1303
|
1313
|
_thumbnailType: tileType,
|
|
1304
|
1314
|
_videoObjectPosition: getVideoObjectPosition(state, participant?.id),
|
|
1305
|
1315
|
_videoTrack,
|
|
1306
|
1316
|
...size,
|
|
1307
|
|
- _gifSrc: mode === 'chat' ? null : gifSrc,
|
|
1308
|
|
- _sourceNameSignalingEnabled: sourceNameSignalingEnabled
|
|
|
1317
|
+ _gifSrc: mode === 'chat' ? null : gifSrc
|
|
1309
|
1318
|
};
|
|
1310
|
1319
|
}
|
|
1311
|
1320
|
|