import React from "react";
import styles from "./AudioPreview.module.css";
import { GroupCallState } from "matrix-js-sdk/src/webrtc/groupCall";
import { SelectInput } from "../input/SelectInput";
import { Item } from "@react-stately/collections";
import { Body } from "../typography/Typography";
export function AudioPreview({
state,
roomName,
audioInput,
audioInputs,
setAudioInput,
audioOutput,
audioOutputs,
setAudioOutput,
}) {
return (
<>
{`${roomName} - Radio Call`}
{state === GroupCallState.LocalCallFeedUninitialized && (
Microphone permissions needed to join the call.
)}
{state === GroupCallState.InitializingLocalCallFeed && (
Accept microphone permissions to join the call.
)}
{state === GroupCallState.LocalCallFeedInitialized && (
<>
{audioInputs.map(({ deviceId, label }) => (
- {label}
))}
{audioOutputs.length > 0 && (
{audioOutputs.map(({ deviceId, label }) => (
- {label}
))}
)}
>
)}
>
);
}