Bladeren bron

Updates framerate using local statistics.

j8
damencho 8 jaren geleden
bovenliggende
commit
54d891afa7

+ 9
- 0
modules/UI/videolayout/ConnectionIndicator.js Bestand weergeven

@@ -409,6 +409,15 @@ ConnectionIndicator.prototype.updateResolution = function (resolution) {
409 409
     this.updatePopoverData();
410 410
 };
411 411
 
412
+/**
413
+ * Updates the framerate
414
+ * @param framerate the new resolution
415
+ */
416
+ConnectionIndicator.prototype.updateFramerate = function (framerate) {
417
+    this.framerate = framerate;
418
+    this.updatePopoverData();
419
+};
420
+
412 421
 /**
413 422
  * Updates the content of the popover if its visible
414 423
  * @param force to work even if popover is not visible

+ 10
- 0
modules/UI/videolayout/RemoteVideo.js Bestand weergeven

@@ -744,6 +744,16 @@ RemoteVideo.prototype.updateResolution = function (resolution) {
744 744
     }
745 745
 };
746 746
 
747
+/**
748
+ * Updates this video framerate indication.
749
+ * @param framerate the value to update
750
+ */
751
+RemoteVideo.prototype.updateFramerate = function (framerate) {
752
+    if (this.connectionIndicator) {
753
+        this.connectionIndicator.updateFramerate(framerate);
754
+    }
755
+};
756
+
747 757
 RemoteVideo.prototype.removeConnectionIndicator = function () {
748 758
     if (this.connectionIndicator)
749 759
         this.connectionIndicator.remove();

+ 13
- 0
modules/UI/videolayout/VideoLayout.js Bestand weergeven

@@ -875,6 +875,19 @@ var VideoLayout = {
875 875
                 remoteVideo.updateResolution(resolutionValue);
876 876
             }
877 877
         });
878
+
879
+        Object.keys(framerate).forEach(function (id) {
880
+            if (APP.conference.isLocalId(id)) {
881
+                return;
882
+            }
883
+
884
+            const framerateValue = framerate[id];
885
+            const remoteVideo = remoteVideos[id];
886
+
887
+            if (framerateValue && remoteVideo) {
888
+                remoteVideo.updateFramerate(framerateValue);
889
+            }
890
+        });
878 891
     },
879 892
 
880 893
     /**

Laden…
Annuleren
Opslaan