Fix: enabling autoreduce for Jitsi rooms

This commit is contained in:
Ludwig Behm 2021-01-29 22:43:51 +01:00
parent 287934f7c4
commit fa51666d6f
1 changed files with 2 additions and 0 deletions

View File

@ -1228,6 +1228,7 @@ export class GameScene extends ResizableScene implements CenterListener {
} }
public startJitsi(roomName: string, jwt?: string): void { public startJitsi(roomName: string, jwt?: string): void {
audioManager.decreaseVolume();
const jitsiUrl = this.getMapProperty('jitsiUrl', 'string', JITSI_URL); const jitsiUrl = this.getMapProperty('jitsiUrl', 'string', JITSI_URL);
jitsiFactory.start(jitsiUrl, roomName, this.playerName, jwt); jitsiFactory.start(jitsiUrl, roomName, this.playerName, jwt);
this.connection.setSilent(true); this.connection.setSilent(true);
@ -1240,6 +1241,7 @@ export class GameScene extends ResizableScene implements CenterListener {
} }
public stopJitsi(): void { public stopJitsi(): void {
audioManager.restoreVolume();
this.connection.setSilent(false); this.connection.setSilent(false);
jitsiFactory.stop(); jitsiFactory.stop();
mediaManager.showGameOverlay(); mediaManager.showGameOverlay();