Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(RTC): report conference start timestamp through rtcstats (#11646)
Nils Ohlmeier066dd71afbd5
diff --git a/react/features/rtcstats/RTCStats.js b/react/features/rtcstats/RTCStats.jsindex 3f6d928161..2691bcb66a 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.jsindex 8802535d3b..1ed716bf8e 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);