+
{iconsAndLabels === "audio" && outputOptions && (
<>
@@ -320,15 +347,10 @@ export const MediaMuteAndSwitchButton: FC = ({
numberedLabel,
)}
{iconsAndLabels === "audio" && (
- <>
-
- {/* Closes the microphone section. The meter stays pinned until
- this line reaches it, then leaves with the section. */}
-
- >
+
)}
diff --git a/src/state/MediaDevices.test.ts b/src/state/MediaDevices.test.ts
index f65b024e2..dfe59e98d 100644
--- a/src/state/MediaDevices.test.ts
+++ b/src/state/MediaDevices.test.ts
@@ -5,8 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
-import { describe, expect, test, vi } from "vitest";
-import { of } from "rxjs";
+import { afterEach, describe, expect, test, vi } from "vitest";
const getPlatform = vi.hoisted(() => vi.fn(() => "desktop"));
vi.mock("../Platform", () => ({
@@ -15,9 +14,23 @@ vi.mock("../Platform", () => ({
},
isFirefox: (): boolean => false,
}));
-vi.mock("@livekit/components-core", () => ({
- createMediaDeviceObserver: () => of([]),
-}));
+// One observer per device kind, so a test can add and remove hardware.
+const observers = vi.hoisted(
+ () => new Map