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 ### Added
- Render custom emojis in display names. - Render custom emojis in display names.
- Display player for audio attachments.
### Changed ### Changed

View file

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