diff options
Diffstat (limited to 'client-web')
-rw-r--r-- | client-web/source/preferences/decl.ts | 3 | ||||
-rw-r--r-- | client-web/source/user/remote.ts | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts index c0cf55d..c4e247c 100644 --- a/client-web/source/preferences/decl.ts +++ b/client-web/source/preferences/decl.ts @@ -27,6 +27,9 @@ export const PREF_DECLS = { camera_facing_mode: { type: optional(string), possible_values: ["environment", "user"], description: "Prefer user-facing or env-facing camera" }, auto_gain_control: { type: bool, description: "Automatically adjust mic gain" }, echo_cancellation: { type: bool, description: "Cancel echo" }, + // TODO differenciate between mic, cam and screen + optional_audio_default_enable: { type: bool, default: true, description: "Enable audio tracks by default" }, + optional_video_default_enable: { type: bool, default: false, description: "Enable video tracks by default" }, notify_chat: { type: bool, default: true, description: "Send notifications for incoming chat messages" }, notify_join: { type: bool, default: true, description: "Send notifications when users join" }, diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts index 8921b04..20ec351 100644 --- a/client-web/source/user/remote.ts +++ b/client-web/source/user/remote.ts @@ -80,6 +80,10 @@ export class RemoteUser extends User { console.log(message.provide.id); const d = Resource.create(this, message.provide) if (!d) return + if (d instanceof TrackResource) { + if (d.info.kind == "video" && PREFS.optional_video_default_enable) d.request() + if (d.info.kind == "audio" && PREFS.optional_audio_default_enable) d.request() + } this.el.append(d.el) this.resources.set(message.provide.id, d) } |