Skip to content

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

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

Boris Grozev09016c2182fa
diff --git a/conference.js b/conference.js
index 1e36bac3e2..d1c62530ce 100644
--- a/conference.js
+++ b/conference.js
@@ -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,26 +1298,10 @@ export default {
}
room.on(ConnectionQualityEvents.LOCAL_STATS_UPDATED,
- (percent, stats) => {
- APP.UI.updateLocalStats(percent, 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;
- }
+ (stats) => {
+ APP.UI.updateLocalStats(stats.connectionQuality, stats);
- try {
- room.broadcastEndpointMessage({
- type: this.commands.defaults.CONNECTION_QUALITY,
- values: data });
- } catch (e) {
- reportError(e);
- }
- });
+ });
room.on(ConnectionQualityEvents.REMOTE_STATS_UPDATED,
(id, percent, stats) => {