Browse Source

Adds frame rate to statistics bubble.

j8
damencho 8 years ago
parent
commit
65239f9ffe

+ 1
- 0
lang/main.json View File

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

+ 18
- 2
modules/UI/videolayout/ConnectionIndicator.js View File

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

+ 2
- 1
modules/UI/videolayout/VideoLayout.js View File

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

Loading…
Cancel
Save