|
@@ -58,6 +58,11 @@ const QUALITY_TO_WIDTH: Array<Object> = [
|
58
|
58
|
*/
|
59
|
59
|
type Props = AbstractProps & {
|
60
|
60
|
|
|
61
|
+ /**
|
|
62
|
+ * The audio SSRC of this client.
|
|
63
|
+ */
|
|
64
|
+ _audioSsrc: number,
|
|
65
|
+
|
61
|
66
|
/**
|
62
|
67
|
* The current condition of the user's connection, matching one of the
|
63
|
68
|
* enumerated values in the library.
|
|
@@ -65,51 +70,51 @@ type Props = AbstractProps & {
|
65
|
70
|
_connectionStatus: string,
|
66
|
71
|
|
67
|
72
|
/**
|
68
|
|
- * The audio SSRC of this client.
|
|
73
|
+ * Whether or not should display the "Show More" link in the local video
|
|
74
|
+ * stats table.
|
69
|
75
|
*/
|
70
|
|
- audioSsrc: number,
|
|
76
|
+ _disableShowMoreStats: boolean,
|
71
|
77
|
|
72
|
78
|
/**
|
73
|
|
- * Css class to apply on container
|
|
79
|
+ * Whether or not should display the "Save Logs" link in the local video
|
|
80
|
+ * stats table.
|
74
|
81
|
*/
|
75
|
|
- className: string,
|
|
82
|
+ _enableSaveLogs: boolean,
|
76
|
83
|
|
77
|
84
|
/**
|
78
|
|
- * The Redux dispatch function.
|
|
85
|
+ * Whether or not the displays stats are for local video.
|
79
|
86
|
*/
|
80
|
|
- dispatch: Dispatch<any>,
|
|
87
|
+ _isLocalVideo: boolean,
|
81
|
88
|
|
82
|
89
|
/**
|
83
|
|
- * Whether or not should display the "Show More" link in the local video
|
84
|
|
- * stats table.
|
|
90
|
+ * Invoked to save the conference logs.
|
85
|
91
|
*/
|
86
|
|
- disableShowMoreStats: boolean,
|
|
92
|
+ _onSaveLogs: Function,
|
87
|
93
|
|
88
|
94
|
/**
|
89
|
|
- * Whether or not should display the "Save Logs" link in the local video
|
90
|
|
- * stats table.
|
|
95
|
+ * The video SSRC of this client.
|
91
|
96
|
*/
|
92
|
|
- enableSaveLogs: boolean,
|
|
97
|
+ _videoSsrc: number,
|
93
|
98
|
|
94
|
99
|
/**
|
95
|
|
- * Whether or not the displays stats are for local video.
|
|
100
|
+ * Css class to apply on container
|
96
|
101
|
*/
|
97
|
|
- isLocalVideo: boolean,
|
|
102
|
+ className: string,
|
98
|
103
|
|
99
|
104
|
/**
|
100
|
|
- * Invoked to obtain translated strings.
|
|
105
|
+ * The Redux dispatch function.
|
101
|
106
|
*/
|
102
|
|
- t: Function,
|
|
107
|
+ dispatch: Dispatch<any>,
|
103
|
108
|
|
104
|
109
|
/**
|
105
|
|
- * The video SSRC of this client.
|
|
110
|
+ * Optional param for passing existing connection stats on component instantiation
|
106
|
111
|
*/
|
107
|
|
- videoSsrc: number,
|
|
112
|
+ inheritedStats: Object,
|
108
|
113
|
|
109
|
114
|
/**
|
110
|
|
- * Invoked to save the conference logs.
|
|
115
|
+ * Invoked to obtain translated strings.
|
111
|
116
|
*/
|
112
|
|
- _onSaveLogs: Function
|
|
117
|
+ t: Function
|
113
|
118
|
};
|
114
|
119
|
|
115
|
120
|
/**
|
|
@@ -143,7 +148,7 @@ class ConnectionIndicatorContent extends AbstractConnectionIndicator<Props, Stat
|
143
|
148
|
autoHideTimeout: undefined,
|
144
|
149
|
showIndicator: false,
|
145
|
150
|
showMoreStats: false,
|
146
|
|
- stats: {}
|
|
151
|
+ stats: props.inheritedStats || {}
|
147
|
152
|
};
|
148
|
153
|
|
149
|
154
|
// Bind event handlers so they are only bound once for every instance.
|
|
@@ -174,17 +179,17 @@ class ConnectionIndicatorContent extends AbstractConnectionIndicator<Props, Stat
|
174
|
179
|
|
175
|
180
|
return (
|
176
|
181
|
<ConnectionStatsTable
|
177
|
|
- audioSsrc = { this.props.audioSsrc }
|
|
182
|
+ audioSsrc = { this.props._audioSsrc }
|
178
|
183
|
bandwidth = { bandwidth }
|
179
|
184
|
bitrate = { bitrate }
|
180
|
185
|
bridgeCount = { bridgeCount }
|
181
|
186
|
codec = { codec }
|
182
|
187
|
connectionSummary = { this._getConnectionStatusTip() }
|
183
|
|
- disableShowMoreStats = { this.props.disableShowMoreStats }
|
|
188
|
+ disableShowMoreStats = { this.props._disableShowMoreStats }
|
184
|
189
|
e2eRtt = { e2eRtt }
|
185
|
|
- enableSaveLogs = { this.props.enableSaveLogs }
|
|
190
|
+ enableSaveLogs = { this.props._enableSaveLogs }
|
186
|
191
|
framerate = { framerate }
|
187
|
|
- isLocalVideo = { this.props.isLocalVideo }
|
|
192
|
+ isLocalVideo = { this.props._isLocalVideo }
|
188
|
193
|
maxEnabledResolution = { maxEnabledResolution }
|
189
|
194
|
onSaveLogs = { this.props._onSaveLogs }
|
190
|
195
|
onShowMore = { this._onToggleShowMore }
|
|
@@ -195,7 +200,7 @@ class ConnectionIndicatorContent extends AbstractConnectionIndicator<Props, Stat
|
195
|
200
|
serverRegion = { serverRegion }
|
196
|
201
|
shouldShowMore = { this.state.showMoreStats }
|
197
|
202
|
transport = { transport }
|
198
|
|
- videoSsrc = { this.props.videoSsrc } />
|
|
203
|
+ videoSsrc = { this.props._videoSsrc } />
|
199
|
204
|
);
|
200
|
205
|
}
|
201
|
206
|
|
|
@@ -303,8 +308,9 @@ export function _mapStateToProps(state: Object, ownProps: Props) {
|
303
|
308
|
= participantId ? getParticipantById(state, participantId) : getLocalParticipant(state);
|
304
|
309
|
const props = {
|
305
|
310
|
_connectionStatus: participant?.connectionStatus,
|
306
|
|
- enableSaveLogs: state['features/base/config'].enableSaveLogs,
|
307
|
|
- disableShowMoreStats: state['features/base/config'].disableShowMoreStats
|
|
311
|
+ _enableSaveLogs: state['features/base/config'].enableSaveLogs,
|
|
312
|
+ _disableShowMoreStats: state['features/base/config'].disableShowMoreStats,
|
|
313
|
+ _isLocalVideo: participant?.local
|
308
|
314
|
};
|
309
|
315
|
|
310
|
316
|
if (conference) {
|
|
@@ -315,8 +321,8 @@ export function _mapStateToProps(state: Object, ownProps: Props) {
|
315
|
321
|
|
316
|
322
|
return {
|
317
|
323
|
...props,
|
318
|
|
- audioSsrc: firstAudioTrack ? conference.getSsrcByTrack(firstAudioTrack.jitsiTrack) : undefined,
|
319
|
|
- videoSsrc: firstVideoTrack ? conference.getSsrcByTrack(firstVideoTrack.jitsiTrack) : undefined
|
|
324
|
+ _audioSsrc: firstAudioTrack ? conference.getSsrcByTrack(firstAudioTrack.jitsiTrack) : undefined,
|
|
325
|
+ _videoSsrc: firstVideoTrack ? conference.getSsrcByTrack(firstVideoTrack.jitsiTrack) : undefined
|
320
|
326
|
};
|
321
|
327
|
}
|
322
|
328
|
|