Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(RTCStats) Stop sending dominantSpeaker events. They are handled in lib-jitsi-meet now.

Jaya Allamsettya45453e39194
diff --git a/react/features/rtcstats/RTCStats.ts b/react/features/rtcstats/RTCStats.ts
index 403459bbbe..66ff25c816 100644
--- a/react/features/rtcstats/RTCStats.ts
+++ b/react/features/rtcstats/RTCStats.ts
@@ -2,10 +2,8 @@ import JitsiMeetJS, { RTCStatsEvents } from '../base/lib-jitsi-meet';
import logger from './logger';
import {
- DominantSpeakerData,
E2ERTTData,
- FaceLandmarksData,
- VideoTypeData
+ FaceLandmarksData
} from './types';
// TODO(saghul): expose these in libn-jitsi-meet?
@@ -46,16 +44,6 @@ class RTCStats {
JitsiMeetJS.rtcstats.sendStatsEntry('logs', logEntries);
}
- /**
- * Send dominant speaker data, the data will be processed by rtcstats-server and saved in the dump file.
- *
- * @param {Object} dominantSpeakerData - Dominant speaker data to be saved in the rtcstats dump.
- * @returns {void}
- */
- sendDominantSpeakerData(dominantSpeakerData: DominantSpeakerData) {
- JitsiMeetJS.rtcstats.sendStatsEntry('dominantSpeaker', dominantSpeakerData);
- }
-
/**
* Send e2e rtt data, the data will be processed by rtcstats-server and saved in the dump file.
*
@@ -87,16 +75,6 @@ class RTCStats {
JitsiMeetJS.rtcstats.sendStatsEntry('conferenceStartTimestamp', timestamp);
}
- /**
- * Send videoType data, the data will be processed by rtcstats-server and saved in the dump file.
- *
- * @param {Object} videoTypeData - The object that holds the videoType data.
- * @returns {void}
- */
- sendVideoTypeData(videoTypeData: VideoTypeData) {
- JitsiMeetJS.rtcstats.sendStatsEntry('setVideoType', videoTypeData);
- }
-
/**
* Send face landmarks data, the data will be processed by rtcstats-server and saved in the dump file.
*
diff --git a/react/features/rtcstats/middleware.ts b/react/features/rtcstats/middleware.ts
index 41f975fcd5..699a4ab245 100644
--- a/react/features/rtcstats/middleware.ts
+++ b/react/features/rtcstats/middleware.ts
@@ -5,9 +5,8 @@ import {
CONFERENCE_JOINED,
E2E_RTT_CHANGED
} from '../base/conference/actionTypes';
-import { DOMINANT_SPEAKER_CHANGED } from '../base/participants/actionTypes';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
-import { TRACK_ADDED, TRACK_UPDATED } from '../base/tracks/actionTypes';
+import { TRACK_UPDATED } from '../base/tracks/actionTypes';
import { ADD_FACE_LANDMARKS } from '../face-landmarks/actionTypes';
import { FaceLandmarks } from '../face-landmarks/types';
import { sendGetCustomerIdRequest } from '../jaas/functions';
@@ -47,25 +46,10 @@ MiddlewareRegistry.register((store: IStore) => (next: Function) => (action: AnyA
}
break;
}
- case TRACK_ADDED: {
- if (isRTCStatsEnabled(state)) {
- const jitsiTrack = action?.track?.jitsiTrack;
- const { ssrc, videoType } = jitsiTrack || { };
-
- // Remote tracks store their ssrc in the jitsiTrack object. Local tracks don't. See getSsrcByTrack.
- if (videoType && ssrc && !jitsiTrack.isLocal() && !jitsiTrack.isAudioTrack()) {
- RTCStats.sendVideoTypeData({
- ssrc,
- videoType
- });
- }
- }
- break;
- }
case TRACK_UPDATED: {
if (isRTCStatsEnabled(state)) {
- const { videoType, jitsiTrack, muted } = action?.track || { };
- const { ssrc, isLocal, videoType: trackVideoType, conference } = jitsiTrack || { };
+ const { jitsiTrack, muted } = action?.track || { };
+ const { isLocal, videoType: trackVideoType, conference } = jitsiTrack || { };
if (trackVideoType === 'camera' && conference && isLocal()) {
RTCStats.sendFaceLandmarksData({
@@ -74,27 +58,6 @@ MiddlewareRegistry.register((store: IStore) => (next: Function) => (action: AnyA
timestamp: Date.now()
});
}
-
- // if the videoType of the remote track has changed we expect to find it in track.videoType. grep for
- // trackVideoTypeChanged.
- if (videoType && ssrc && !jitsiTrack.isLocal() && !jitsiTrack.isAudioTrack()) {
-
- RTCStats.sendVideoTypeData({
- ssrc,
- videoType
- });
- }
- }
- break;
- }
- case DOMINANT_SPEAKER_CHANGED: {
- if (isRTCStatsEnabled(state)) {
- const { id, previousSpeakers, silence } = action.participant;
-
- RTCStats.sendDominantSpeakerData({
- dominantSpeakerEndpoint: silence ? null : id,
- previousSpeakers
- });
}
break;
}
diff --git a/react/features/rtcstats/types.ts b/react/features/rtcstats/types.ts
index 7dc399ddef..70f257c929 100644
--- a/react/features/rtcstats/types.ts
+++ b/react/features/rtcstats/types.ts
@@ -1,13 +1,4 @@
-export type VideoTypeData = {
- ssrc: number;
- videoType: string;
-};
-
-export type DominantSpeakerData = {
- dominantSpeakerEndpoint: string;
- previousSpeakers: string[];
-};
-
+// Types for RTC stats entries.
export type E2ERTTData = {
remoteEndpointId: string;
remoteRegion: string;