refactor: Moves more code to lib-jitsi-meet.
This commit is contained in:
parent
22b2f17234
commit
09016c2182
|
@ -37,7 +37,6 @@ import {VIDEO_CONTAINER_TYPE} from "./modules/UI/videolayout/VideoContainer";
|
||||||
* Known custom conference commands.
|
* Known custom conference commands.
|
||||||
*/
|
*/
|
||||||
const commands = {
|
const commands = {
|
||||||
CONNECTION_QUALITY: "stats",
|
|
||||||
EMAIL: "email",
|
EMAIL: "email",
|
||||||
AVATAR_URL: "avatar-url",
|
AVATAR_URL: "avatar-url",
|
||||||
AVATAR_ID: "avatar-id",
|
AVATAR_ID: "avatar-id",
|
||||||
|
@ -1299,26 +1298,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
room.on(ConnectionQualityEvents.LOCAL_STATS_UPDATED,
|
room.on(ConnectionQualityEvents.LOCAL_STATS_UPDATED,
|
||||||
(percent, stats) => {
|
(stats) => {
|
||||||
APP.UI.updateLocalStats(percent, 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,
|
room.on(ConnectionQualityEvents.REMOTE_STATS_UPDATED,
|
||||||
(id, percent, stats) => {
|
(id, percent, stats) => {
|
||||||
|
|
Loading…
Reference in New Issue