forked from github/cinny
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:
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user