diff options
author | MetaMuffin <metamuffin@yandex.com> | 2021-08-06 15:04:50 +0200 |
---|---|---|
committer | MetaMuffin <metamuffin@yandex.com> | 2021-08-06 15:04:50 +0200 |
commit | fe66a0b23dafd562fc50ddfe5ba326ee33872c24 (patch) | |
tree | fbe80cc7acddbf34b109c5ae5fdee5eb5e7ccae9 /source/client/local_user.ts | |
parent | 23655aec49f4920a8d5fa77899a0199dc651c907 (diff) | |
download | keks-meet-fe66a0b23dafd562fc50ddfe5ba326ee33872c24.tar keks-meet-fe66a0b23dafd562fc50ddfe5ba326ee33872c24.tar.bz2 keks-meet-fe66a0b23dafd562fc50ddfe5ba326ee33872c24.tar.zst |
mute preview of local user
Diffstat (limited to 'source/client/local_user.ts')
-rw-r--r-- | source/client/local_user.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/client/local_user.ts b/source/client/local_user.ts index 729dcb7..78652b3 100644 --- a/source/client/local_user.ts +++ b/source/client/local_user.ts @@ -16,6 +16,7 @@ export class LocalUser extends User { constructor(room: Room, name: string) { super(room, name) this.el.classList.add("local") + this.local = true this.create_controls() if (parameter_bool("audio_enabled", false)) this.enable_audio() if (parameter_bool("video_enabled", false)) this.enable_video() @@ -93,6 +94,7 @@ export class LocalUser extends User { this.audio_track = t this.room.remote_users.forEach(u => u.peer.addTrack(t)) + this.stream.addTrack(t) this.update_view_w() } async disable_video() { @@ -113,6 +115,7 @@ export class LocalUser extends User { if (s.track == this.audio_track) u.peer.removeTrack(s) }) }) + this.stream.removeTrack(this.audio_track) this.update_view_w() this.audio_track = undefined } |