From c045e90e0dc2e62cd228ea9bbc9f0b18feca3b2f Mon Sep 17 00:00:00 2001
From: xdzqyyds <2292136545@qq.com>
Date: Tue, 19 Nov 2024 23:49:59 +0800
Subject: [PATCH] npx eslint --fix
---
webapp/components/device.tsx | 7 +++--
webapp/components/svg/speaker.tsx | 2 +-
webapp/components/use/whip.ts | 44 +++++++++++++++----------------
3 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/webapp/components/device.tsx b/webapp/components/device.tsx
index 8d80ffa..3ef9629 100644
--- a/webapp/components/device.tsx
+++ b/webapp/components/device.tsx
@@ -38,7 +38,6 @@ export default function DeviceBar(props: { streamId: string }) {
setCurrentDeviceSpeaker,
setCurrentDeviceAudio,
setCurrentDeviceVideo,
- toggleEnableSpeaker,
toggleEnableAudio,
toggleEnableVideo,
} = useWhipClient(props.streamId)
@@ -93,8 +92,8 @@ export default function DeviceBar(props: { streamId: string }) {
const videos = devices.filter(i => i.kind === 'videoinput').map(toDevice)
if ( currentDeviceSpeaker === deviceNone.deviceId) {
- let device = speakers[0];
- if (device) await setCurrentDeviceSpeaker(device.deviceId);
+ const device = speakers[0]
+ if (device) await setCurrentDeviceSpeaker(device.deviceId)
}
if (currentDeviceAudio === deviceNone.deviceId) {
@@ -170,7 +169,7 @@ export default function DeviceBar(props: { streamId: string }) {
return (
-
+