Skip to content

Commit

Permalink
Big red button: brain fart fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tbjolset committed Jun 17, 2021
1 parent 3c09cb7 commit c62909f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Big Red Button/BigRedButton.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import xapi from 'xapi';

const action = 'toggleMute'; // toggleMute, endCall
const action = 'toggleMute';

function toggleMute() {
xapi.Command.Audio.Microphones.ToggleMute();
Expand All @@ -21,7 +21,8 @@ async function onKey({ Key, Type }) {

if (Key === 'KEY_SPACE') {
console.log('go!');
const inCall = await xapi.Status.Call.get().length > 0;
const calls = await xapi.Status.Call.get();
const inCall = calls.length > 0;
if (inCall) {
if (action === 'toggleMute') {
toggleMute();
Expand Down

0 comments on commit c62909f

Please sign in to comment.