Adds settings options and localUser functions

This commit is contained in:
Benedicte Quimbert
2022-03-07 15:43:00 +01:00
parent d4e20a792e
commit 85f3a1a9c8
6 changed files with 287 additions and 216 deletions
+9
View File
@@ -12,6 +12,7 @@ import { privacyShutdownStore } from "./PrivacyShutdownStore";
import { MediaStreamConstraintsError } from "./Errors/MediaStreamConstraintsError";
import { SoundMeter } from "../Phaser/Components/SoundMeter";
import { AudioContext } from "standardized-audio-context";
import { visibilityStore } from "./VisibilityStore";
/**
* A store that contains the camera state requested by the user (on or off).
@@ -242,6 +243,8 @@ export const mediaStreamConstraintsStore = derived(
privacyShutdownStore,
cameraEnergySavingStore,
isSilentStore,
visibilityStore,
//TODO: optionState
],
(
[
@@ -254,6 +257,7 @@ export const mediaStreamConstraintsStore = derived(
$privacyShutdownStore,
$cameraEnergySavingStore,
$isSilentStore,
$visibilityStore
],
set
) => {
@@ -308,6 +312,11 @@ export const mediaStreamConstraintsStore = derived(
currentAudioConstraint = false;
}
// if ($visibilityStore === false && $option) {
//
// }
//TODO
// Let's make the changes only if the new value is different from the old one.
if (
previousComputedVideoConstraint != currentVideoConstraint ||