瀏覽代碼

Include the callstats username in the rtcstats display name. (#10173)

We want to be able to correlate between rtcstats and callstats, so we're
appending the callstats user name (if it exists) to the display name.
master
George Politis 4 年之前
父節點
當前提交
16402d8482
No account linked to committer's email address
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9
    1
      react/features/rtcstats/middleware.js

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

@@ -1,5 +1,7 @@
1 1
 // @flow
2 2
 
3
+import { jitsiLocalStorage } from '@jitsi/js-utils';
4
+
3 5
 import { getAmplitudeIdentity } from '../analytics';
4 6
 import { CONFERENCE_UNIQUE_ID_SET, getConferenceOptions, getRoomName } from '../base/conference';
5 7
 import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
@@ -72,12 +74,18 @@ MiddlewareRegistry.register(store => next => action => {
72 74
                 // This is done in order to facilitate queries based on different conference configurations.
73 75
                 // e.g. Find all RTCPeerConnections that connect to a specific shard or were created in a
74 76
                 // conference with a specific version.
77
+                // XXX(george): we also want to be able to correlate between rtcstats and callstats, so we're
78
+                // appending the callstats user name (if it exists) to the display name.
79
+                const displayName = options.statisticsId
80
+                    || options.statisticsDisplayName
81
+                    || jitsiLocalStorage.getItem('callStatsUserName');
82
+
75 83
                 RTCStats.sendIdentityData({
76 84
                     ...getAmplitudeIdentity(),
77 85
                     ...options,
78 86
                     endpointId: localParticipant?.id,
79 87
                     confName: getRoomName(state),
80
-                    displayName: localParticipant?.name,
88
+                    displayName,
81 89
                     meetingUniqueId
82 90
                 });
83 91
             } catch (error) {

Loading…
取消
儲存