Apply deafen state when call member changes (#2737)

* fix deafen not working

* apply deafen state when call member changes

* remove unnecessary condition
This commit is contained in:
Ajay Bura
2026-03-08 14:22:11 +11:00
committed by GitHub
parent c6bb4915bc
commit 7953ec80e5
5 changed files with 29 additions and 7 deletions

View File

@@ -47,6 +47,10 @@ export class CallControl extends EventEmitter implements CallControlState {
this.emitStateUpdate();
}
public applySound() {
this.setSound(this.sound);
}
private setMediaState(state: ElementMediaStatePayload) {
return this.call.transport.send(ElementWidgetActions.DeviceMute, state);
}
@@ -55,10 +59,8 @@ export class CallControl extends EventEmitter implements CallControlState {
const callDocument = this.iframe.contentDocument ?? this.iframe.contentWindow?.document;
if (callDocument) {
callDocument.querySelectorAll('audio').forEach((el) => {
if (el instanceof HTMLAudioElement) {
// eslint-disable-next-line no-param-reassign
el.muted = !sound;
}
// eslint-disable-next-line no-param-reassign
el.muted = !sound;
});
}
}