feat(RTC): report conference start timestamp through rtcstats (#11646)

This commit is contained in:
Nils Ohlmeier 2022-06-15 15:22:15 -07:00 committed by GitHub
parent d573bd41b4
commit 066dd71afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -105,6 +105,17 @@ class RTCStats {
this.trace && this.trace.statsEntry('e2eRtt', null, e2eRttData); this.trace && this.trace.statsEntry('e2eRtt', null, e2eRttData);
} }
/**
* Send the timestamp of the start of the conference, the data will be processed by the rtcstats-server
* and saved in the dump file.
*
* @param {Oject} timestamp - The object which contains the timestamp.
* @returns {void}
*/
sendConferenceTimestamp(timestamp) {
this.trace && this.trace.statsEntry('conferenceStartTimestamp', null, timestamp);
}
/** /**
* Send videoType data, the data will be processed by rtcstats-server and saved in the dump file. * Send videoType data, the data will be processed by rtcstats-server and saved in the dump file.
* *

View File

@ -3,7 +3,8 @@
import { jitsiLocalStorage } from '@jitsi/js-utils'; import { jitsiLocalStorage } from '@jitsi/js-utils';
import { getAmplitudeIdentity } from '../analytics'; import { getAmplitudeIdentity } from '../analytics';
import { CONFERENCE_UNIQUE_ID_SET, E2E_RTT_CHANGED, getConferenceOptions, getRoomName } from '../base/conference'; import { CONFERENCE_UNIQUE_ID_SET, E2E_RTT_CHANGED, CONFERENCE_TIMESTAMP_CHANGED, getConferenceOptions, getRoomName }
from '../base/conference';
import { LIB_WILL_INIT } from '../base/lib-jitsi-meet/actionTypes'; import { LIB_WILL_INIT } from '../base/lib-jitsi-meet/actionTypes';
import { DOMINANT_SPEAKER_CHANGED, getLocalParticipant } from '../base/participants'; import { DOMINANT_SPEAKER_CHANGED, getLocalParticipant } from '../base/participants';
import { MiddlewareRegistry } from '../base/redux'; import { MiddlewareRegistry } from '../base/redux';
@ -161,6 +162,14 @@ MiddlewareRegistry.register(store => next => action => {
} }
break; break;
} }
case CONFERENCE_TIMESTAMP_CHANGED: {
if (canSendRtcstatsData(state)) {
const conferenceTimestamp = action.conferenceTimestamp;
RTCStats.sendConferenceTimestamp(conferenceTimestamp);
}
break;
}
} }
return next(action); return next(action);