Skip to content

Commit

Permalink
fix: Audio element not working on safari (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
alimtunc authored Aug 10, 2023
1 parent d8c6897 commit 4c00887
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/chainlit/frontend/src/components/atoms/element/audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export default function AudioElement({ element }: Props) {
return null;
}
const className = `${element.display}-audio`;
const src = element.url || URL.createObjectURL(new Blob([element.content!]));
const src =
element.url ||
URL.createObjectURL(new Blob([element.content!], { type: 'audio/mpeg' }));
return (
<Box className={className}>
<Box
Expand Down

0 comments on commit 4c00887

Please sign in to comment.