diff --git a/conference.js b/conference.js index 319e5980b..7333bd562 100644 --- a/conference.js +++ b/conference.js @@ -33,6 +33,7 @@ import { conferenceLeft, conferenceSubjectChanged, conferenceTimestampChanged, + conferenceUniqueIdSet, conferenceWillJoin, conferenceWillLeave, dataChannelOpened, @@ -1865,6 +1866,10 @@ export default { APP.store.dispatch(conferenceLeft(room, ...args)); }); + room.on( + JitsiConferenceEvents.CONFERENCE_UNIQUE_ID_SET, + (...args) => APP.store.dispatch(conferenceUniqueIdSet(room, ...args))); + room.on( JitsiConferenceEvents.AUTH_STATUS_CHANGED, (authEnabled, authLogin) => diff --git a/package-lock.json b/package-lock.json index 85b23fd81..c663f6f9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10343,8 +10343,8 @@ } }, "lib-jitsi-meet": { - "version": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07", - "from": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07", + "version": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0", + "from": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0", "requires": { "@jitsi/js-utils": "1.0.2", "@jitsi/sdp-interop": "1.0.3", diff --git a/package.json b/package.json index 6f5cd8b3d..b4ffb995c 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "jquery-i18next": "1.2.1", "js-md5": "0.6.1", "jwt-decode": "2.2.0", - "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07", + "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0", "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d", "lodash": "4.17.19", "moment": "2.19.4", diff --git a/react/features/base/conference/actionTypes.js b/react/features/base/conference/actionTypes.js index 1445c0c6e..39c79a664 100644 --- a/react/features/base/conference/actionTypes.js +++ b/react/features/base/conference/actionTypes.js @@ -42,6 +42,16 @@ export const CONFERENCE_JOINED = 'CONFERENCE_JOINED'; */ export const CONFERENCE_LEFT = 'CONFERENCE_LEFT'; +/** + * The type of (redux) action which signals that an uuid for a conference has been set. + * + * { + * type: CONFERENCE_UNIQUE_ID_SET, + * conference: JitsiConference + * } + */ +export const CONFERENCE_UNIQUE_ID_SET = 'CONFERENCE_UNIQUE_ID_SET'; + /** * The type of (redux) action, which indicates conference subject changes. * diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js index 4739bc61e..a56022208 100644 --- a/react/features/base/conference/actions.js +++ b/react/features/base/conference/actions.js @@ -36,6 +36,7 @@ import { CONFERENCE_LEFT, CONFERENCE_SUBJECT_CHANGED, CONFERENCE_TIMESTAMP_CHANGED, + CONFERENCE_UNIQUE_ID_SET, CONFERENCE_WILL_JOIN, CONFERENCE_WILL_LEAVE, DATA_CHANNEL_OPENED, @@ -295,6 +296,22 @@ export function conferenceLeft(conference: Object) { }; } +/** + * Signals that the unique identifier for conference has been set. + * + * @param {JitsiConference} conference - The JitsiConference instance, where the uuid has been set. + * @returns {{ + * type: CONFERENCE_UNIQUE_ID_SET, + * conference: JitsiConference, + * }} + */ +export function conferenceUniqueIdSet(conference: Object) { + return { + type: CONFERENCE_UNIQUE_ID_SET, + conference + }; +} + /** * Signals that the conference subject has been changed. * diff --git a/react/features/rtcstats/middleware.js b/react/features/rtcstats/middleware.js index 0d816ba72..4c1843105 100644 --- a/react/features/rtcstats/middleware.js +++ b/react/features/rtcstats/middleware.js @@ -1,9 +1,7 @@ // @flow import { getAmplitudeIdentity } from '../analytics'; -import { - CONFERENCE_JOINED -} from '../base/conference'; +import { CONFERENCE_UNIQUE_ID_SET } from '../base/conference'; import { LIB_WILL_INIT } from '../base/lib-jitsi-meet'; import { getLocalParticipant } from '../base/participants'; import { MiddlewareRegistry } from '../base/redux'; @@ -47,7 +45,7 @@ MiddlewareRegistry.register(store => next => action => { } break; } - case CONFERENCE_JOINED: { + case CONFERENCE_UNIQUE_ID_SET: { if (isRtcstatsEnabled(state) && RTCStats.isInitialized()) { // Once the conference started connect to the rtcstats server and send data. try { @@ -55,6 +53,11 @@ MiddlewareRegistry.register(store => next => action => { const localParticipant = getLocalParticipant(state); + // Unique identifier for a conference session, not to be confused with meeting name + // i.e. If all participants leave a meeting it will have a different value on the next join. + const { conference } = action; + const meetingUniqueId = conference && conference.getMeetingUniqueId(); + // The current implementation of rtcstats-server is configured to send data to amplitude, thus // we add identity specific information so we can corelate on the amplitude side. If amplitude is // not configured an empty object will be sent. @@ -65,7 +68,8 @@ MiddlewareRegistry.register(store => next => action => { RTCStats.sendIdentityData({ ...getAmplitudeIdentity(), ...config, - displayName: localParticipant?.name + displayName: localParticipant?.name, + meetingUniqueId }); } catch (error) { // If the connection failed do not impact jitsi-meet just silently fail.