mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 10:22:30 +01:00
add audio attachment player
This commit is contained in:
parent
7fc50fae54
commit
f307f48c39
@ -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}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user