feat(rtcstats): send meeting uuid to rtcstats (#8526)
* send meeting uuid to rtcstats * change ret description * fix flow error * update lib-jitsi-meet version
This commit is contained in:
parent
87f688dc8f
commit
9895a04609
|
@ -33,6 +33,7 @@ import {
|
||||||
conferenceLeft,
|
conferenceLeft,
|
||||||
conferenceSubjectChanged,
|
conferenceSubjectChanged,
|
||||||
conferenceTimestampChanged,
|
conferenceTimestampChanged,
|
||||||
|
conferenceUniqueIdSet,
|
||||||
conferenceWillJoin,
|
conferenceWillJoin,
|
||||||
conferenceWillLeave,
|
conferenceWillLeave,
|
||||||
dataChannelOpened,
|
dataChannelOpened,
|
||||||
|
@ -1865,6 +1866,10 @@ export default {
|
||||||
APP.store.dispatch(conferenceLeft(room, ...args));
|
APP.store.dispatch(conferenceLeft(room, ...args));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
room.on(
|
||||||
|
JitsiConferenceEvents.CONFERENCE_UNIQUE_ID_SET,
|
||||||
|
(...args) => APP.store.dispatch(conferenceUniqueIdSet(room, ...args)));
|
||||||
|
|
||||||
room.on(
|
room.on(
|
||||||
JitsiConferenceEvents.AUTH_STATUS_CHANGED,
|
JitsiConferenceEvents.AUTH_STATUS_CHANGED,
|
||||||
(authEnabled, authLogin) =>
|
(authEnabled, authLogin) =>
|
||||||
|
|
|
@ -10343,8 +10343,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lib-jitsi-meet": {
|
"lib-jitsi-meet": {
|
||||||
"version": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07",
|
"version": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0",
|
||||||
"from": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07",
|
"from": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@jitsi/js-utils": "1.0.2",
|
"@jitsi/js-utils": "1.0.2",
|
||||||
"@jitsi/sdp-interop": "1.0.3",
|
"@jitsi/sdp-interop": "1.0.3",
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
"jquery-i18next": "1.2.1",
|
"jquery-i18next": "1.2.1",
|
||||||
"js-md5": "0.6.1",
|
"js-md5": "0.6.1",
|
||||||
"jwt-decode": "2.2.0",
|
"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",
|
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
|
||||||
"lodash": "4.17.19",
|
"lodash": "4.17.19",
|
||||||
"moment": "2.19.4",
|
"moment": "2.19.4",
|
||||||
|
|
|
@ -42,6 +42,16 @@ export const CONFERENCE_JOINED = 'CONFERENCE_JOINED';
|
||||||
*/
|
*/
|
||||||
export const CONFERENCE_LEFT = 'CONFERENCE_LEFT';
|
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.
|
* The type of (redux) action, which indicates conference subject changes.
|
||||||
*
|
*
|
||||||
|
|
|
@ -36,6 +36,7 @@ import {
|
||||||
CONFERENCE_LEFT,
|
CONFERENCE_LEFT,
|
||||||
CONFERENCE_SUBJECT_CHANGED,
|
CONFERENCE_SUBJECT_CHANGED,
|
||||||
CONFERENCE_TIMESTAMP_CHANGED,
|
CONFERENCE_TIMESTAMP_CHANGED,
|
||||||
|
CONFERENCE_UNIQUE_ID_SET,
|
||||||
CONFERENCE_WILL_JOIN,
|
CONFERENCE_WILL_JOIN,
|
||||||
CONFERENCE_WILL_LEAVE,
|
CONFERENCE_WILL_LEAVE,
|
||||||
DATA_CHANNEL_OPENED,
|
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.
|
* Signals that the conference subject has been changed.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import { getAmplitudeIdentity } from '../analytics';
|
import { getAmplitudeIdentity } from '../analytics';
|
||||||
import {
|
import { CONFERENCE_UNIQUE_ID_SET } from '../base/conference';
|
||||||
CONFERENCE_JOINED
|
|
||||||
} from '../base/conference';
|
|
||||||
import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
|
import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
|
||||||
import { getLocalParticipant } from '../base/participants';
|
import { getLocalParticipant } from '../base/participants';
|
||||||
import { MiddlewareRegistry } from '../base/redux';
|
import { MiddlewareRegistry } from '../base/redux';
|
||||||
|
@ -47,7 +45,7 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CONFERENCE_JOINED: {
|
case CONFERENCE_UNIQUE_ID_SET: {
|
||||||
if (isRtcstatsEnabled(state) && RTCStats.isInitialized()) {
|
if (isRtcstatsEnabled(state) && RTCStats.isInitialized()) {
|
||||||
// Once the conference started connect to the rtcstats server and send data.
|
// Once the conference started connect to the rtcstats server and send data.
|
||||||
try {
|
try {
|
||||||
|
@ -55,6 +53,11 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
|
|
||||||
const localParticipant = getLocalParticipant(state);
|
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
|
// 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
|
// we add identity specific information so we can corelate on the amplitude side. If amplitude is
|
||||||
// not configured an empty object will be sent.
|
// not configured an empty object will be sent.
|
||||||
|
@ -65,7 +68,8 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
RTCStats.sendIdentityData({
|
RTCStats.sendIdentityData({
|
||||||
...getAmplitudeIdentity(),
|
...getAmplitudeIdentity(),
|
||||||
...config,
|
...config,
|
||||||
displayName: localParticipant?.name
|
displayName: localParticipant?.name,
|
||||||
|
meetingUniqueId
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// If the connection failed do not impact jitsi-meet just silently fail.
|
// If the connection failed do not impact jitsi-meet just silently fail.
|
||||||
|
|
Loading…
Reference in New Issue