Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Updates framerate using local statistics.

damencho54d891afa701
diff --git a/modules/UI/videolayout/ConnectionIndicator.js b/modules/UI/videolayout/ConnectionIndicator.js
index 70b2a990e6..0d234e4a51 100644
--- a/modules/UI/videolayout/ConnectionIndicator.js
+++ b/modules/UI/videolayout/ConnectionIndicator.js
@@ -409,6 +409,15 @@ ConnectionIndicator.prototype.updateResolution = function (resolution) {
this.updatePopoverData();
};
+/**
+ * Updates the framerate
+ * @param framerate the new resolution
+ */
+ConnectionIndicator.prototype.updateFramerate = function (framerate) {
+ this.framerate = framerate;
+ this.updatePopoverData();
+};
+
/**
* Updates the content of the popover if its visible
* @param force to work even if popover is not visible
diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js
index 3ccb2897c8..44f14b98a1 100644
--- a/modules/UI/videolayout/RemoteVideo.js
+++ b/modules/UI/videolayout/RemoteVideo.js
@@ -744,6 +744,16 @@ RemoteVideo.prototype.updateResolution = function (resolution) {
}
};
+/**
+ * Updates this video framerate indication.
+ * @param framerate the value to update
+ */
+RemoteVideo.prototype.updateFramerate = function (framerate) {
+ if (this.connectionIndicator) {
+ this.connectionIndicator.updateFramerate(framerate);
+ }
+};
+
RemoteVideo.prototype.removeConnectionIndicator = function () {
if (this.connectionIndicator)
this.connectionIndicator.remove();
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js
index b058218cc1..822b7954c5 100644
--- a/modules/UI/videolayout/VideoLayout.js
+++ b/modules/UI/videolayout/VideoLayout.js
@@ -875,6 +875,19 @@ var VideoLayout = {
remoteVideo.updateResolution(resolutionValue);
}
});
+
+ Object.keys(framerate).forEach(function (id) {
+ if (APP.conference.isLocalId(id)) {
+ return;
+ }
+
+ const framerateValue = framerate[id];
+ const remoteVideo = remoteVideos[id];
+
+ if (framerateValue && remoteVideo) {
+ remoteVideo.updateFramerate(framerateValue);
+ }
+ });
},
/**