diff options
author | metamuffin <metamuffin@disroot.org> | 2022-09-16 21:27:09 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-09-16 21:27:09 +0200 |
commit | 1fb9614478adc6e107324274310ebf83146779ba (patch) | |
tree | 762ef006c5e0b85cce16f415fd9a6fdfba4c60fa /client-web/source | |
parent | 52b7bf7a052d2da6c71db7695dde73716cb0e4e5 (diff) | |
download | keks-meet-1fb9614478adc6e107324274310ebf83146779ba.tar keks-meet-1fb9614478adc6e107324274310ebf83146779ba.tar.bz2 keks-meet-1fb9614478adc6e107324274310ebf83146779ba.tar.zst |
optional streams (4, prefs for auto-enable)
Diffstat (limited to 'client-web/source')
-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) } |