Skip to content

Commit eab733c

Browse files
authored
fix(web): rtc not turn-ed off when destroy (#1203)
1 parent 7b3590c commit eab733c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/flat-web/src/api-middleware/rtc/avatar.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ export class RtcAvatar extends EventEmitter {
5757
this.observeVolumeId = window.setInterval(this.checkVolume, 500);
5858
}
5959

60-
public destroy(): void {
60+
public async destroy(): Promise<void> {
6161
clearInterval(this.observeVolumeId);
62+
await this.setMic(false);
63+
await this.setCamera(false);
6264
this.rtc.removeAvatar(this);
6365
}
6466

0 commit comments

Comments
 (0)