Display player for audio attachments

This commit is contained in:
silverpill 2023-03-05 14:13:14 +00:00
parent 8321999d2b
commit 530ba50e09
2 changed files with 3 additions and 0 deletions

View file

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
- Render custom emojis in display names.
- Display player for audio attachments.
### Changed

View file

@ -1,6 +1,7 @@
<template>
<img v-if="attachment.type === 'image'" :src="attachment.url">
<video v-else-if="attachment.type === 'video'" :src="attachment.url" controls></video>
<audio v-else-if="attachment.type === 'audio'" :src="attachment.url" controls></audio>
<div v-else>
&bull; <a :href="attachment.url">{{ attachment.url }}</a>
</div>
@ -30,6 +31,7 @@ img {
width: 100%;
}
audio,
video {
width: 100%;
}