Преглед на файлове

Adds frame rate to statistics bubble.

j8
damencho преди 8 години
родител
ревизия
65239f9ffe
променени са 3 файла, в които са добавени 21 реда и са изтрити 3 реда
  1. 1
    0
      lang/main.json
  2. 18
    2
      modules/UI/videolayout/ConnectionIndicator.js
  3. 2
    1
      modules/UI/videolayout/VideoLayout.js

+ 1
- 0
lang/main.json Целия файл

@@ -177,6 +177,7 @@
177 177
         "bitrate": "Bitrate:",
178 178
         "packetloss": "Packet loss:",
179 179
         "resolution": "Resolution:",
180
+        "framerate": "Frame rate:",
180 181
         "less": "Show less",
181 182
         "more": "Show more",
182 183
         "address": "Address:",

+ 18
- 2
modules/UI/videolayout/ConnectionIndicator.js Целия файл

@@ -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);

+ 2
- 1
modules/UI/videolayout/VideoLayout.js Целия файл

@@ -857,9 +857,10 @@ var VideoLayout = {
857 857
      * @param object
858 858
      */
859 859
     updateLocalConnectionStats (percent, object) {
860
-        let resolutions = object.resolution;
860
+        const { framerates, resolutions } = object;
861 861
 
862 862
         object.resolution = resolutions[APP.conference.getMyUserId()];
863
+        object.framerate = framerates[APP.conference.getMyUserId()];
863 864
         localVideoThumbnail.updateStatsIndicator(percent, object);
864 865
 
865 866
         Object.keys(resolutions).forEach(function (id) {

Loading…
Отказ
Запис