MCPcopy Create free account
hub / github.com/Roy3838/Observer / getCaptureQuality

Method getCaptureQuality

app/src/utils/settings.ts:191–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189 private readonly CAPTURE_QUALITY_DEFAULTS = { maxWidth: 1280, jpegQuality: 55, fps: 10 };
190
191 public getCaptureQuality(): { maxWidth: number; jpegQuality: number; fps: number } {
192 const stored = localStorage.getItem(this.CAPTURE_QUALITY_KEY);
193 if (!stored) return { ...this.CAPTURE_QUALITY_DEFAULTS };
194 try {
195 return { ...this.CAPTURE_QUALITY_DEFAULTS, ...JSON.parse(stored) };
196 } catch {
197 return { ...this.CAPTURE_QUALITY_DEFAULTS };
198 }
199 }
200
201 public setCaptureQuality(value: { maxWidth: number; jpegQuality: number; fps: number }): void {
202 localStorage.setItem(this.CAPTURE_QUALITY_KEY, JSON.stringify(value));

Callers 3

SettingsTabFunction · 0.80
pushCaptureConfigMethod · 0.80
teardownMasterStreamMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected