refactor: Moves more code to lib-jitsi-meet.

This commit is contained in:
Boris Grozev 2016-10-27 15:07:38 -05:00
parent 22b2f17234
commit 09016c2182
1 changed files with 3 additions and 20 deletions

View File

@ -37,7 +37,6 @@ import {VIDEO_CONTAINER_TYPE} from "./modules/UI/videolayout/VideoContainer";
* Known custom conference commands.
*/
const commands = {
CONNECTION_QUALITY: "stats",
EMAIL: "email",
AVATAR_URL: "avatar-url",
AVATAR_ID: "avatar-id",
@ -1299,25 +1298,9 @@ export default {
}
room.on(ConnectionQualityEvents.LOCAL_STATS_UPDATED,
(percent, stats) => {
APP.UI.updateLocalStats(percent, stats);
(stats) => {
APP.UI.updateLocalStats(stats.connectionQuality, stats);
// TODO: Move this to the library.
// Send only the data that remote participants care about.
let data = {
bitrate: stats.bitrate,
packetLoss: stats.packetLoss};
if (localVideo && localVideo.resolution) {
data.resolution = localVideo.resolution;
}
try {
room.broadcastEndpointMessage({
type: this.commands.defaults.CONNECTION_QUALITY,
values: data });
} catch (e) {
reportError(e);
}
});
room.on(ConnectionQualityEvents.REMOTE_STATS_UPDATED,