From 441416f3120b1c78d73c54eb53999d5473ed7152 Mon Sep 17 00:00:00 2001 From: Johannes Berthel Date: Tue, 30 Mar 2021 22:38:44 +0200 Subject: [PATCH] use frame rate setting for initialization --- front/src/WebRtc/MediaManager.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/front/src/WebRtc/MediaManager.ts b/front/src/WebRtc/MediaManager.ts index 12a6f706..9da4aa59 100644 --- a/front/src/WebRtc/MediaManager.ts +++ b/front/src/WebRtc/MediaManager.ts @@ -2,19 +2,14 @@ import {DivImportance, layoutManager} from "./LayoutManager"; import {HtmlUtils} from "./HtmlUtils"; import {discussionManager, SendMessageCallback} from "./DiscussionManager"; import {UserInputManager} from "../Phaser/UserInput/UserInputManager"; -import {VIDEO_QUALITY_SELECT} from "../Administration/ConsoleGlobalMessageManager"; +import {localUserStore} from "../Connexion/LocalUserStore"; import {UserSimplePeerInterface} from "./SimplePeer"; declare const navigator:any; // eslint-disable-line @typescript-eslint/no-explicit-any -const localValueVideo = localStorage.getItem(VIDEO_QUALITY_SELECT); -let valueVideo = 20; -if(localValueVideo){ - valueVideo = parseInt(localValueVideo); -} let videoConstraint: boolean|MediaTrackConstraints = { width: { min: 640, ideal: 1280, max: 1920 }, height: { min: 400, ideal: 720 }, - frameRate: { ideal: valueVideo }, + frameRate: { ideal: localUserStore.getVideoQualityValue() }, facingMode: "user", resizeMode: 'crop-and-scale', aspectRatio: 1.777777778