From 30a234158f0ae0491473a2e2713516d2bcae84da Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 14 Oct 2021 14:38:07 +1100 Subject: [PATCH] lint --- ts/components/session/calling/CallContainer.tsx | 8 ++++++-- .../session/icon/DropDownAndToggleButton.tsx | 2 +- ts/session/utils/CallManager.ts | 12 +++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ts/components/session/calling/CallContainer.tsx b/ts/components/session/calling/CallContainer.tsx index 35c6e98b0..97a130cf0 100644 --- a/ts/components/session/calling/CallContainer.tsx +++ b/ts/components/session/calling/CallContainer.tsx @@ -384,12 +384,16 @@ export const InConversationCallContainer = () => { setVideoMuted(false)} + onUnmute={() => { + setVideoMuted(false); + }} camerasList={currentConnectedCameras} /> setAudioMuted(false)} + onUnmute={() => { + setAudioMuted(false); + }} audioInputsList={currentConnectedAudioInputs} /> diff --git a/ts/components/session/icon/DropDownAndToggleButton.tsx b/ts/components/session/icon/DropDownAndToggleButton.tsx index a462fd6fa..564888044 100644 --- a/ts/components/session/icon/DropDownAndToggleButton.tsx +++ b/ts/components/session/icon/DropDownAndToggleButton.tsx @@ -12,7 +12,7 @@ type SProps = { }; const StyledRoundedButton = styled.div<{ isMuted: boolean }>` - background-color: ${props => (props.isMuted ? 'black' : 'white')}; + background-color: ${props => (props.isMuted ? 'hsl(0,0%,40%)' : 'white')}; color: ${props => (props.isMuted ? 'white' : 'black')}; border-radius: 50%; cursor: pointer; diff --git a/ts/session/utils/CallManager.ts b/ts/session/utils/CallManager.ts index e9351f21b..1177b45d1 100644 --- a/ts/session/utils/CallManager.ts +++ b/ts/session/utils/CallManager.ts @@ -83,11 +83,13 @@ async function getConnectedDevices(type: 'videoinput' | 'audioinput') { } // Listen for changes to media devices and update the list accordingly -navigator.mediaDevices.addEventListener('devicechange', async () => { - await updateInputLists(); - callVideoListener(); -}); - +// tslint:disable-next-line: no-typeof-undefined +if (typeof navigator !== 'undefined') { + navigator.mediaDevices.addEventListener('devicechange', async () => { + await updateInputLists(); + callVideoListener(); + }); +} async function updateInputLists() { // Get the set of cameras connected const videoCameras = await getConnectedDevices('videoinput');