This commit is contained in:
Robert 2024-03-19 00:42:40 +07:00
parent ab3c60532e
commit ecf584323e
No known key found for this signature in database
GPG Key ID: F631C7FD957D5F22
3 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import type { CommentAction } from "./schema";
type ActionAttachmentType = "empty" | "image" | "voice";
const imageExtensions = ["jpeg", "jpg", "png"];
const voiceExtensions = ["mp3"];
const voiceExtensions = ["mp3", "ogg"];
export function getActionAttachmentType(
action: CommentAction,

View File

@ -151,6 +151,7 @@ export default function ActionCard({
<div className="flex justify-center p-3">
<audio controls>
<source src={action.fileUrls[0]} type="audio/mp3" />
<source src={action.fileUrls[0]} type="audio/ogg" />
</audio>
</div>
)}

View File

@ -279,6 +279,7 @@ export default function ActionEditor({
<div className="mt-10 flex justify-center">
<audio controls>
<source src={voiceUrl} type="audio/mp3" />
<source src={voiceUrl} type="audio/ogg" />
</audio>
</div>
)}