Pārlūkot izejas kodu

Merge pull request #1412 from jitsi/framerate-update

Updates framerate using local statistics.
j8
George Politis 8 gadus atpakaļ
vecāks
revīzija
b7fd10b905

+ 9
- 0
modules/UI/videolayout/ConnectionIndicator.js Parādīt failu

409
     this.updatePopoverData();
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
  * Updates the content of the popover if its visible
422
  * Updates the content of the popover if its visible
414
  * @param force to work even if popover is not visible
423
  * @param force to work even if popover is not visible

+ 10
- 0
modules/UI/videolayout/RemoteVideo.js Parādīt failu

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
 RemoteVideo.prototype.removeConnectionIndicator = function () {
757
 RemoteVideo.prototype.removeConnectionIndicator = function () {
748
     if (this.connectionIndicator)
758
     if (this.connectionIndicator)
749
         this.connectionIndicator.remove();
759
         this.connectionIndicator.remove();

+ 13
- 0
modules/UI/videolayout/VideoLayout.js Parādīt failu

875
                 remoteVideo.updateResolution(resolutionValue);
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
     /**

Notiek ielāde…
Atcelt
Saglabāt