Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
404bb3fd
Commit
404bb3fd
authored
Jun 06, 2024
by
Timothy J. Baek
Browse files
refac: call overlay
parent
eacce66a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
src/lib/components/chat/MessageInput/CallOverlay.svelte
src/lib/components/chat/MessageInput/CallOverlay.svelte
+12
-3
No files found.
src/lib/components/chat/MessageInput/CallOverlay.svelte
View file @
404bb3fd
...
...
@@ -87,7 +87,13 @@
const detectSound = () => {
const processFrame = () => {
if (!mediaRecorder || !$showCallOverlay) return;
if (!mediaRecorder || !$showCallOverlay) {
if (mediaRecorder) {
mediaRecorder.stop();
}
return;
}
analyser.getByteTimeDomainData(timeDomainData);
analyser.getByteFrequencyData(domainData);
...
...
@@ -137,7 +143,7 @@
}
};
const stopRecording
Handler
= async () => {
const stopRecording
Callback
= async () => {
if ($showCallOverlay) {
if (confirmed) {
loading = true;
...
...
@@ -152,6 +158,9 @@
mediaRecorder = false;
startRecording();
} else {
audioChunks = [];
mediaRecorder = false;
}
};
...
...
@@ -171,7 +180,7 @@
mediaRecorder.onstop = async () => {
console.log('Recording stopped');
await stopRecording
Handler
();
await stopRecording
Callback
();
};
mediaRecorder.start();
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment