Merge pull request #1412 from jitsi/framerate-update

Updates framerate using local statistics.
This commit is contained in:
George Politis 2017-03-17 17:17:24 -05:00 committed by GitHub
commit b7fd10b905
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);
}
});
},
/**