|
@@ -6,18 +6,21 @@ import ReactDOM from 'react-dom';
|
6
|
6
|
import { I18nextProvider } from 'react-i18next';
|
7
|
7
|
import { Provider } from 'react-redux';
|
8
|
8
|
|
|
9
|
+import { createScreenSharingIssueEvent, sendAnalytics } from '../../../react/features/analytics';
|
9
|
10
|
import { Avatar } from '../../../react/features/base/avatar';
|
10
|
11
|
import { i18next } from '../../../react/features/base/i18n';
|
11
|
12
|
import {
|
12
|
13
|
JitsiParticipantConnectionStatus
|
13
|
14
|
} from '../../../react/features/base/lib-jitsi-meet';
|
14
|
|
-import { VIDEO_TYPE } from '../../../react/features/base/media';
|
|
15
|
+import { MEDIA_TYPE, VIDEO_TYPE } from '../../../react/features/base/media';
|
15
|
16
|
import { getParticipantById } from '../../../react/features/base/participants';
|
|
17
|
+import { getTrackByMediaTypeAndParticipant } from '../../../react/features/base/tracks';
|
16
|
18
|
import { CHAT_SIZE } from '../../../react/features/chat';
|
17
|
19
|
import {
|
18
|
20
|
updateKnownLargeVideoResolution
|
19
|
21
|
} from '../../../react/features/large-video/actions';
|
20
|
22
|
import { PresenceLabel } from '../../../react/features/presence-status';
|
|
23
|
+import { shouldDisplayTileView } from '../../../react/features/video-layout';
|
21
|
24
|
/* eslint-enable no-unused-vars */
|
22
|
25
|
import UIEvents from '../../../service/UI/UIEvents';
|
23
|
26
|
import { createDeferred } from '../../util/helpers';
|
|
@@ -203,8 +206,7 @@ export default class LargeVideoManager {
|
203
|
206
|
// FIXME this does not really make sense, because the videoType
|
204
|
207
|
// (camera or desktop) is a completely different thing than
|
205
|
208
|
// the video container type (Etherpad, SharedVideo, VideoContainer).
|
206
|
|
- const isVideoContainer
|
207
|
|
- = LargeVideoManager.isVideoContainer(videoType);
|
|
209
|
+ const isVideoContainer = LargeVideoManager.isVideoContainer(videoType);
|
208
|
210
|
|
209
|
211
|
this.newStreamData = null;
|
210
|
212
|
|
|
@@ -219,14 +221,15 @@ export default class LargeVideoManager {
|
219
|
221
|
this.updateAvatar();
|
220
|
222
|
|
221
|
223
|
const isVideoMuted = !stream || stream.isMuted();
|
222
|
|
- const participant = getParticipantById(APP.store.getState(), id);
|
|
224
|
+ const state = APP.store.getState();
|
|
225
|
+ const participant = getParticipantById(state, id);
|
223
|
226
|
const connectionStatus = participant?.connectionStatus;
|
224
|
227
|
const isVideoRenderable = !isVideoMuted
|
225
|
228
|
&& (APP.conference.isLocalId(id) || connectionStatus === JitsiParticipantConnectionStatus.ACTIVE);
|
226
|
|
-
|
|
229
|
+ const isAudioOnly = APP.conference.isAudioOnly();
|
227
|
230
|
const showAvatar
|
228
|
231
|
= isVideoContainer
|
229
|
|
- && ((APP.conference.isAudioOnly() && videoType !== VIDEO_TYPE.DESKTOP) || !isVideoRenderable);
|
|
232
|
+ && ((isAudioOnly && videoType !== VIDEO_TYPE.DESKTOP) || !isVideoRenderable);
|
230
|
233
|
|
231
|
234
|
let promise;
|
232
|
235
|
|
|
@@ -238,6 +241,29 @@ export default class LargeVideoManager {
|
238
|
241
|
// If the intention of this switch is to show the avatar
|
239
|
242
|
// we need to make sure that the video is hidden
|
240
|
243
|
promise = container.hide();
|
|
244
|
+
|
|
245
|
+ if ((!shouldDisplayTileView(state) || participant?.pinned) // In theory the tile view may not be
|
|
246
|
+ // enabled yet when we auto pin the participant.
|
|
247
|
+
|
|
248
|
+ && participant && !participant.local && !participant.isFakeParticipant) {
|
|
249
|
+ // remote participant only
|
|
250
|
+ const track = getTrackByMediaTypeAndParticipant(
|
|
251
|
+ state['features/base/tracks'], MEDIA_TYPE.VIDEO, id);
|
|
252
|
+ const isScreenSharing = track?.videoType === 'desktop';
|
|
253
|
+
|
|
254
|
+ if (isScreenSharing) {
|
|
255
|
+ // send the event
|
|
256
|
+ sendAnalytics(createScreenSharingIssueEvent({
|
|
257
|
+ source: 'large-video',
|
|
258
|
+ connectionStatus,
|
|
259
|
+ isVideoMuted,
|
|
260
|
+ isAudioOnly,
|
|
261
|
+ isVideoContainer,
|
|
262
|
+ videoType
|
|
263
|
+ }));
|
|
264
|
+ }
|
|
265
|
+ }
|
|
266
|
+
|
241
|
267
|
} else {
|
242
|
268
|
promise = container.show();
|
243
|
269
|
}
|