Merge pull request #52 from joelmathewthomas/fix/exceptions
Fix/exceptions
This commit is contained in:
@@ -52,6 +52,8 @@ function UploadPage() {
|
||||
recorder.onstop = () => {
|
||||
const blob = new Blob(chunks, { type: "audio/wav" });
|
||||
const file = new File([blob], "recording.wav", { type: "audio/wav" });
|
||||
const tracks = stream.getTracks();
|
||||
tracks.forEach(track => track.stop());
|
||||
validateAndSetFile(file);
|
||||
handleUpload(file);
|
||||
};
|
||||
@@ -337,6 +339,7 @@ function UploadPage() {
|
||||
e.stopPropagation(); // Prevent click from reaching file input
|
||||
isRecording ? stopRecording() : startRecording();
|
||||
}}
|
||||
disabled={!isConnected}
|
||||
>
|
||||
{isRecording ? "Stop Recording" : "Start Recording"}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user