diff --git a/react/features/rtcstats/RTCStats.js b/react/features/rtcstats/RTCStats.js index 3f6d92816..2691bcb66 100644 --- a/react/features/rtcstats/RTCStats.js +++ b/react/features/rtcstats/RTCStats.js @@ -105,6 +105,17 @@ class RTCStats { 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. * diff --git a/react/features/rtcstats/middleware.js b/react/features/rtcstats/middleware.js index 8802535d3..1ed716bf8 100644 --- a/react/features/rtcstats/middleware.js +++ b/react/features/rtcstats/middleware.js @@ -3,7 +3,8 @@ import { jitsiLocalStorage } from '@jitsi/js-utils'; 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 { DOMINANT_SPEAKER_CHANGED, getLocalParticipant } from '../base/participants'; import { MiddlewareRegistry } from '../base/redux'; @@ -161,6 +162,14 @@ MiddlewareRegistry.register(store => next => action => { } break; } + case CONFERENCE_TIMESTAMP_CHANGED: { + if (canSendRtcstatsData(state)) { + const conferenceTimestamp = action.conferenceTimestamp; + + RTCStats.sendConferenceTimestamp(conferenceTimestamp); + } + break; + } } return next(action);