Updates framerate using local statistics.

This commit is contained in:
damencho 2017-03-17 16:10:45 -05:00
parent ae41782cd4
commit 54d891afa7
3 changed files with 32 additions and 0 deletions

View File

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

View File

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

View File

@ -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);
}
});
},
/**