WIP
This commit is contained in:
parent
69b1acc1f0
commit
8d2d3617c3
|
@ -623,15 +623,15 @@ function emitUpdReaction(emoji: string, delta: number) {
|
|||
}
|
||||
|
||||
watch(convert, (newBlob) => {
|
||||
if (converturl.value && converturl.value.url) {
|
||||
URL.revokeObjectURL(converturl.value.url);
|
||||
}
|
||||
if (converturl.value && converturl.value.url) {
|
||||
URL.revokeObjectURL(converturl.value.url);
|
||||
}
|
||||
|
||||
if (newBlob) {
|
||||
converturl.value = { url: URL.createObjectURL(newBlob) };
|
||||
} else {
|
||||
converturl.value = null;
|
||||
}
|
||||
if (newBlob) {
|
||||
converturl.value = { url: newBlob };
|
||||
} else {
|
||||
converturl.value = null;
|
||||
}
|
||||
});
|
||||
console.log(converturl)
|
||||
|
||||
|
|
|
@ -558,17 +558,19 @@ function loadConversation() {
|
|||
}
|
||||
|
||||
watch(convert, (newBlob) => {
|
||||
/*
|
||||
try {
|
||||
if (converturl.value && converturl.value.url) {
|
||||
URL.revokeObjectURL(converturl.value.url);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to revoke URL:', error);
|
||||
}
|
||||
console.error('Failed to revoke URL:', error);
|
||||
}
|
||||
*/
|
||||
|
||||
try {
|
||||
if (newBlob) {
|
||||
converturl.value = { url: URL.createObjectURL(newBlob) };
|
||||
converturl.value = { url: newBlob };
|
||||
} else {
|
||||
converturl.value = null;
|
||||
}
|
||||
|
|
|
@ -314,16 +314,15 @@ export function getNoteMenu(props: {
|
|||
|
||||
const buffers = new Uint8Array(convertdata.body._readableState.buffer[0].data).buffer;
|
||||
|
||||
console.log('UArray:', buffers);
|
||||
|
||||
const blob = new Blob([buffers], { type: contentType });
|
||||
|
||||
console.log('Blob:', blob);
|
||||
|
||||
props.convert.value = URL.createObjectURL(blob);
|
||||
} else {
|
||||
try {
|
||||
const blob = new Blob([buffers], { type: contentType });
|
||||
props.convert.value = URL.createObjectURL(blob);
|
||||
} catch (e) {
|
||||
console.error('Failed to create Blob or Object URL:', e);
|
||||
}
|
||||
} else {
|
||||
console.error('API did not return audio data.');
|
||||
}
|
||||
}
|
||||
props.converting.value = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue