Fix player close in conversation (#625)

* fix player sheet close in conversation

* fix recording save
This commit is contained in:
an-lee
2024-05-21 21:42:12 +08:00
committed by GitHub
parent 8d07c1cf94
commit 3aecd3a901
2 changed files with 17 additions and 17 deletions

View File

@@ -314,23 +314,21 @@ const RecorderButton = (props: { onRecorded: () => void }) => {
if (!media) return;
toast.promise(
async () => {
return EnjoyApp.recordings
.create({
targetId: media.id,
targetType: media.mediaType,
blob: {
type: blob.type.split(";")[0],
arrayBuffer: await blob.arrayBuffer(),
},
referenceId: -1,
referenceText: transcription.result.timeline
.map((s: TimelineEntry) => s.text)
.join("\n"),
duration,
})
.then(() => onRecorded());
},
EnjoyApp.recordings
.create({
targetId: media.id,
targetType: media.mediaType,
blob: {
type: blob.type.split(";")[0],
arrayBuffer: await blob.arrayBuffer(),
},
referenceId: -1,
referenceText: transcription.result.timeline
.map((s: TimelineEntry) => s.text)
.join("\n"),
duration,
})
.then(() => onRecorded()),
{
loading: t("savingRecording"),
success: t("recordingSaved"),

View File

@@ -293,6 +293,8 @@ export const AssistantMessageComponent = (props: {
side="bottom"
className="h-screen p-0"
displayClose={false}
onPointerDownOutside={(event) => event.preventDefault()}
onInteractOutside={(event) => event.preventDefault()}
>
<SheetHeader className="flex items-center justify-center h-14">
<SheetClose>