|
@@ -1,9 +1,7 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
3
|
import { getAmplitudeIdentity } from '../analytics';
|
4
|
|
-import {
|
5
|
|
- CONFERENCE_JOINED
|
6
|
|
-} from '../base/conference';
|
|
4
|
+import { CONFERENCE_UNIQUE_ID_SET } from '../base/conference';
|
7
|
5
|
import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
|
8
|
6
|
import { getLocalParticipant } from '../base/participants';
|
9
|
7
|
import { MiddlewareRegistry } from '../base/redux';
|
|
@@ -47,7 +45,7 @@ MiddlewareRegistry.register(store => next => action => {
|
47
|
45
|
}
|
48
|
46
|
break;
|
49
|
47
|
}
|
50
|
|
- case CONFERENCE_JOINED: {
|
|
48
|
+ case CONFERENCE_UNIQUE_ID_SET: {
|
51
|
49
|
if (isRtcstatsEnabled(state) && RTCStats.isInitialized()) {
|
52
|
50
|
// Once the conference started connect to the rtcstats server and send data.
|
53
|
51
|
try {
|
|
@@ -55,6 +53,11 @@ MiddlewareRegistry.register(store => next => action => {
|
55
|
53
|
|
56
|
54
|
const localParticipant = getLocalParticipant(state);
|
57
|
55
|
|
|
56
|
+ // Unique identifier for a conference session, not to be confused with meeting name
|
|
57
|
+ // i.e. If all participants leave a meeting it will have a different value on the next join.
|
|
58
|
+ const { conference } = action;
|
|
59
|
+ const meetingUniqueId = conference && conference.getMeetingUniqueId();
|
|
60
|
+
|
58
|
61
|
// The current implementation of rtcstats-server is configured to send data to amplitude, thus
|
59
|
62
|
// we add identity specific information so we can corelate on the amplitude side. If amplitude is
|
60
|
63
|
// not configured an empty object will be sent.
|
|
@@ -65,7 +68,8 @@ MiddlewareRegistry.register(store => next => action => {
|
65
|
68
|
RTCStats.sendIdentityData({
|
66
|
69
|
...getAmplitudeIdentity(),
|
67
|
70
|
...config,
|
68
|
|
- displayName: localParticipant?.name
|
|
71
|
+ displayName: localParticipant?.name,
|
|
72
|
+ meetingUniqueId
|
69
|
73
|
});
|
70
|
74
|
} catch (error) {
|
71
|
75
|
// If the connection failed do not impact jitsi-meet just silently fail.
|