From 11e0a1953f5a53f48c2274103fedbff88989d002 Mon Sep 17 00:00:00 2001 From: Jessica Mitchell Date: Fri, 18 Feb 2022 16:33:12 -0500 Subject: [PATCH 1/2] update mute all buttons to avoid wildcards --- .../components/Call/PeopleAside.js | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/custom/fitness-demo/components/Call/PeopleAside.js b/custom/fitness-demo/components/Call/PeopleAside.js index bc18053..be9385f 100644 --- a/custom/fitness-demo/components/Call/PeopleAside.js +++ b/custom/fitness-demo/components/Call/PeopleAside.js @@ -101,6 +101,22 @@ export const PeopleAside = () => { return null; } + async function muteAll(deviceType) { + let updatedParticipantList = {}; + // Accommodate muting mics and cameras + const newSetting = + deviceType === 'video' ? { setVideo: false } : { setAudio: false }; + for (let id in callObject.participants()) { + // Do not update the local participant's device (aka the instructor) + if (id === 'local') continue; + + updatedParticipantList[id] = newSetting; + } + + // Update all participants at once + callObject.updateParticipants(updatedParticipantList); + } + return (