Essential fixes

This commit is contained in:
Koper
2023-07-21 19:00:48 +07:00
parent 8b53d395b2
commit e69071e1d5
5 changed files with 68 additions and 34 deletions

View File

@@ -13,8 +13,6 @@ export function Dashboard({
}) {
const [openIndex, setOpenIndex] = useState(null);
topics = [{timestamp: '[00:00]', transcript: 'Abcdef', title: 'This is the title'}];
return (
<>
<div className="w-3/4 py-4">

View File

@@ -66,6 +66,8 @@ export default function Recorder(props) {
if (!record) return console.log("no record");
if (record?.isRecording()) {
props.serverData.peer.send(JSON.stringify({ cmd: "STOP" }));
record.stopRecording();
setIsRecording(false);
document.getElementById("play-btn").disabled = false;

View File

@@ -64,6 +64,7 @@ const useWebRTC = (stream, setIsRecording) => {
duration: serverData.duration,
summary: serverData.summary,
},
text: ''
}));
setIsRecording(false);
break;

View File

@@ -31,7 +31,7 @@ const App = () => {
<p className="text-gray-500">Capture The Signal, Not The Noise</p>
</div>
<Recorder setStream={setStream} />
<Recorder setStream={setStream} serverData={serverData} />
<Dashboard
isRecording={isRecording}
onRecord={(recording) => handleRecord(recording)}