Skip to content

Commit

Permalink
add audio attachment player
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Sep 12, 2023
1 parent 7fc50fa commit f307f48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/messaging/MessageAttachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export default function MessageAttachment({ attachment, contextMenuItems, maxWid
finalElement = <Image src={url} alt={attachment.filename} width={scaledWidth} height={scaledHeight} />;
} else if (attachment.content_type?.startsWith("video")) {
finalElement = <Video attachment={attachment} />;
} else if (attachment.content_type?.startsWith("audio")) {
finalElement = <audio src={url} controls />;
} else {
logger.warn(`Unknown attachment type: ${attachment.content_type}`);
}
Expand Down

0 comments on commit f307f48

Please sign in to comment.