Skip to content

Commit

Permalink
mute/unmute when leaving/coming back
Browse files Browse the repository at this point in the history
  • Loading branch information
tbjolset authored Aug 1, 2024
1 parent 2696a3e commit 46da601
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BeRightBack/berightback.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async function setVirtualBg(url, spot) {
await xapi.Command.Cameras.Background.Fetch({ Url: url, Image: spot });
await xapi.Command.Cameras.Background.Set({ Image: spot, Mode: 'Image' });
setTimeout(() => xapi.Command.Video.Selfview.Set({ Mode: 'Off' }), 6000);
await xapi.Command.Audio.Volume.Mute();
}
catch(e) {
console.log(e);
Expand Down Expand Up @@ -69,6 +70,7 @@ function removeNotice() {
xapi.Command.Cameras.Background.Set({ Mode: DefaultInCallMode });
xapi.Command.UserInterface.Extensions.Widget.SetValue({ WidgetId: 'berightback_img', Value: 'none' });
alert('Notice removed. Enjoy your call.');
xapi.Command.Audio.Volume.Unmute();
}

function init() {
Expand Down

0 comments on commit 46da601

Please sign in to comment.