mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
add typing
This commit is contained in:
@@ -48,9 +48,10 @@ const App = () => {
|
||||
webRTC?.peer?.send(JSON.stringify({ cmd: "STOP" }));
|
||||
setStream(null);
|
||||
}}
|
||||
topics={webSockets.topics}
|
||||
getAudioStream={getAudioStream}
|
||||
audioDevices={audioDevices}
|
||||
topics={webSockets.topics}
|
||||
useActiveTopic={useActiveTopic}
|
||||
/>
|
||||
|
||||
<Dashboard
|
||||
|
||||
@@ -11,6 +11,7 @@ import Dropdown, { Option } from "react-dropdown";
|
||||
import "react-dropdown/style.css";
|
||||
|
||||
import { formatTime } from "../lib/time";
|
||||
import { Topic } from "./webSocketTypes";
|
||||
|
||||
const AudioInputsDropdown: React.FC<{
|
||||
audioDevices: Option[];
|
||||
@@ -40,7 +41,19 @@ const AudioInputsDropdown: React.FC<{
|
||||
);
|
||||
};
|
||||
|
||||
export default function Recorder(props: any) {
|
||||
type RecorderProps = {
|
||||
setStream: React.Dispatch<React.SetStateAction<MediaStream | null>>;
|
||||
onStop: () => void;
|
||||
topics: Topic[];
|
||||
getAudioStream: (deviceId: string | null) => Promise<MediaStream | null>;
|
||||
audioDevices: Option[];
|
||||
useActiveTopic: [
|
||||
Topic | null,
|
||||
React.Dispatch<React.SetStateAction<Topic | null>>,
|
||||
];
|
||||
};
|
||||
|
||||
export default function Recorder(props: RecorderProps) {
|
||||
const waveformRef = useRef<HTMLDivElement>(null);
|
||||
const [wavesurfer, setWavesurfer] = useState<WaveSurfer | null>(null);
|
||||
const [record, setRecord] = useState<RecordPlugin | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user