瀏覽代碼

feat(rtcstats): send meeting uuid to rtcstats (#8526)

* send meeting uuid to rtcstats

* change ret description

* fix flow error

* update lib-jitsi-meet version
master
Andrei Gavrilescu 4 年之前
父節點
當前提交
9895a04609
No account linked to committer's email address

+ 5
- 0
conference.js 查看文件

33
     conferenceLeft,
33
     conferenceLeft,
34
     conferenceSubjectChanged,
34
     conferenceSubjectChanged,
35
     conferenceTimestampChanged,
35
     conferenceTimestampChanged,
36
+    conferenceUniqueIdSet,
36
     conferenceWillJoin,
37
     conferenceWillJoin,
37
     conferenceWillLeave,
38
     conferenceWillLeave,
38
     dataChannelOpened,
39
     dataChannelOpened,
1865
                 APP.store.dispatch(conferenceLeft(room, ...args));
1866
                 APP.store.dispatch(conferenceLeft(room, ...args));
1866
             });
1867
             });
1867
 
1868
 
1869
+        room.on(
1870
+            JitsiConferenceEvents.CONFERENCE_UNIQUE_ID_SET,
1871
+            (...args) => APP.store.dispatch(conferenceUniqueIdSet(room, ...args)));
1872
+
1868
         room.on(
1873
         room.on(
1869
             JitsiConferenceEvents.AUTH_STATUS_CHANGED,
1874
             JitsiConferenceEvents.AUTH_STATUS_CHANGED,
1870
             (authEnabled, authLogin) =>
1875
             (authEnabled, authLogin) =>

+ 2
- 2
package-lock.json 查看文件

10343
       }
10343
       }
10344
     },
10344
     },
10345
     "lib-jitsi-meet": {
10345
     "lib-jitsi-meet": {
10346
-      "version": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07",
10347
-      "from": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07",
10346
+      "version": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0",
10347
+      "from": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0",
10348
       "requires": {
10348
       "requires": {
10349
         "@jitsi/js-utils": "1.0.2",
10349
         "@jitsi/js-utils": "1.0.2",
10350
         "@jitsi/sdp-interop": "1.0.3",
10350
         "@jitsi/sdp-interop": "1.0.3",

+ 1
- 1
package.json 查看文件

56
     "jquery-i18next": "1.2.1",
56
     "jquery-i18next": "1.2.1",
57
     "js-md5": "0.6.1",
57
     "js-md5": "0.6.1",
58
     "jwt-decode": "2.2.0",
58
     "jwt-decode": "2.2.0",
59
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#9fdde46694d1c4bc8b7f051cc8d50e0df29ffd07",
59
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#479dd989a081e8ae23ca4f4ab68395a2f76d34d0",
60
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
60
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
61
     "lodash": "4.17.19",
61
     "lodash": "4.17.19",
62
     "moment": "2.19.4",
62
     "moment": "2.19.4",

+ 10
- 0
react/features/base/conference/actionTypes.js 查看文件

42
  */
42
  */
43
 export const CONFERENCE_LEFT = 'CONFERENCE_LEFT';
43
 export const CONFERENCE_LEFT = 'CONFERENCE_LEFT';
44
 
44
 
45
+/**
46
+ * The type of (redux) action which signals that an uuid for a conference has been set.
47
+ *
48
+ * {
49
+ *     type: CONFERENCE_UNIQUE_ID_SET,
50
+ *     conference: JitsiConference
51
+ * }
52
+ */
53
+export const CONFERENCE_UNIQUE_ID_SET = 'CONFERENCE_UNIQUE_ID_SET';
54
+
45
 /**
55
 /**
46
  * The type of (redux) action, which indicates conference subject changes.
56
  * The type of (redux) action, which indicates conference subject changes.
47
  *
57
  *

+ 17
- 0
react/features/base/conference/actions.js 查看文件

36
     CONFERENCE_LEFT,
36
     CONFERENCE_LEFT,
37
     CONFERENCE_SUBJECT_CHANGED,
37
     CONFERENCE_SUBJECT_CHANGED,
38
     CONFERENCE_TIMESTAMP_CHANGED,
38
     CONFERENCE_TIMESTAMP_CHANGED,
39
+    CONFERENCE_UNIQUE_ID_SET,
39
     CONFERENCE_WILL_JOIN,
40
     CONFERENCE_WILL_JOIN,
40
     CONFERENCE_WILL_LEAVE,
41
     CONFERENCE_WILL_LEAVE,
41
     DATA_CHANNEL_OPENED,
42
     DATA_CHANNEL_OPENED,
295
     };
296
     };
296
 }
297
 }
297
 
298
 
299
+/**
300
+ * Signals that the unique identifier for conference has been set.
301
+ *
302
+ * @param {JitsiConference} conference - The JitsiConference instance, where the uuid has been set.
303
+ * @returns {{
304
+    *   type: CONFERENCE_UNIQUE_ID_SET,
305
+    *   conference: JitsiConference,
306
+    * }}
307
+    */
308
+export function conferenceUniqueIdSet(conference: Object) {
309
+    return {
310
+        type: CONFERENCE_UNIQUE_ID_SET,
311
+        conference
312
+    };
313
+}
314
+
298
 /**
315
 /**
299
  * Signals that the conference subject has been changed.
316
  * Signals that the conference subject has been changed.
300
  *
317
  *

+ 9
- 5
react/features/rtcstats/middleware.js 查看文件

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

Loading…
取消
儲存