Просмотр исходного кода

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 лет назад
Родитель
Сommit
16402d8482
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 9 добавлений и 1 удалений
  1. 9
    1
      react/features/rtcstats/middleware.js

+ 9
- 1
react/features/rtcstats/middleware.js Просмотреть файл

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { jitsiLocalStorage } from '@jitsi/js-utils';
4
+
3
 import { getAmplitudeIdentity } from '../analytics';
5
 import { getAmplitudeIdentity } from '../analytics';
4
 import { CONFERENCE_UNIQUE_ID_SET, getConferenceOptions, getRoomName } from '../base/conference';
6
 import { CONFERENCE_UNIQUE_ID_SET, getConferenceOptions, getRoomName } from '../base/conference';
5
 import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
7
 import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
72
                 // This is done in order to facilitate queries based on different conference configurations.
74
                 // This is done in order to facilitate queries based on different conference configurations.
73
                 // e.g. Find all RTCPeerConnections that connect to a specific shard or were created in a
75
                 // e.g. Find all RTCPeerConnections that connect to a specific shard or were created in a
74
                 // conference with a specific version.
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
                 RTCStats.sendIdentityData({
83
                 RTCStats.sendIdentityData({
76
                     ...getAmplitudeIdentity(),
84
                     ...getAmplitudeIdentity(),
77
                     ...options,
85
                     ...options,
78
                     endpointId: localParticipant?.id,
86
                     endpointId: localParticipant?.id,
79
                     confName: getRoomName(state),
87
                     confName: getRoomName(state),
80
-                    displayName: localParticipant?.name,
88
+                    displayName,
81
                     meetingUniqueId
89
                     meetingUniqueId
82
                 });
90
                 });
83
             } catch (error) {
91
             } catch (error) {

Загрузка…
Отмена
Сохранить