|
@@ -36,6 +36,7 @@ function ConnectionIndicator(videoContainer, videoId) {
|
36
|
36
|
this.resolution = null;
|
37
|
37
|
this.isResolutionHD = null;
|
38
|
38
|
this.transport = [];
|
|
39
|
+ this.framerate = null;
|
39
|
40
|
this.popover = null;
|
40
|
41
|
this.id = videoId;
|
41
|
42
|
this.create();
|
|
@@ -88,12 +89,17 @@ ConnectionIndicator.prototype.generateText = function () {
|
88
|
89
|
}
|
89
|
90
|
|
90
|
91
|
// GENERATE RESOLUTIONS STRING
|
91
|
|
- let resolutions = this.resolution || {};
|
92
|
|
- let resolutionStr = Object.keys(resolutions).map(function (ssrc) {
|
|
92
|
+ const resolutions = this.resolution || {};
|
|
93
|
+ const resolutionStr = Object.keys(resolutions).map(ssrc => {
|
93
|
94
|
let {width, height} = resolutions[ssrc];
|
94
|
95
|
return `${width}x${height}`;
|
95
|
96
|
}).join(', ') || 'N/A';
|
96
|
97
|
|
|
98
|
+ const framerates = this.framerate || {};
|
|
99
|
+ const frameRateStr = Object.keys(framerates).map(ssrc =>
|
|
100
|
+ framerates[ssrc]
|
|
101
|
+ ).join(', ') || 'N/A';
|
|
102
|
+
|
97
|
103
|
let result = (
|
98
|
104
|
`<table class="connection-info__container" style='width:100%'>
|
99
|
105
|
<tr>
|
|
@@ -119,6 +125,14 @@ ConnectionIndicator.prototype.generateText = function () {
|
119
|
125
|
${resolutionStr}
|
120
|
126
|
</td>
|
121
|
127
|
</tr>
|
|
128
|
+ <tr>
|
|
129
|
+ <td>
|
|
130
|
+ <span data-i18n='connectionindicator.framerate'></span>
|
|
131
|
+ </td>
|
|
132
|
+ <td>
|
|
133
|
+ ${frameRateStr}
|
|
134
|
+ </td>
|
|
135
|
+ </tr>
|
122
|
136
|
</table>`);
|
123
|
137
|
|
124
|
138
|
if(this.videoContainer.videoSpanId == "localVideoContainer") {
|
|
@@ -371,6 +385,8 @@ ConnectionIndicator.prototype.updateConnectionQuality =
|
371
|
385
|
if (object.resolution) {
|
372
|
386
|
this.resolution = object.resolution;
|
373
|
387
|
}
|
|
388
|
+ if (object.framerate)
|
|
389
|
+ this.framerate = object.framerate;
|
374
|
390
|
}
|
375
|
391
|
|
376
|
392
|
let width = qualityToWidth.find(x => percent >= x.percent);
|