mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-09 01:49:14 +00:00
Add audio player
This commit is contained in:
parent
ea697a1bb1
commit
3210283ae2
2 changed files with 10 additions and 0 deletions
|
@ -23,6 +23,10 @@ const Attachment = {
|
||||||
type = 'video'
|
type = 'video'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (this.attachment.mimetype.match(/ogg|audio/)) {
|
||||||
|
type = 'audio'
|
||||||
|
}
|
||||||
|
|
||||||
return type
|
return type
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
<video v-if="type === 'video' && !nsfw" :src="attachment.url" controls></video>
|
<video v-if="type === 'video' && !nsfw" :src="attachment.url" controls></video>
|
||||||
|
|
||||||
|
<audio v-if="type === 'audio'" :src="attachment.url" controls></audio>
|
||||||
|
|
||||||
<span v-if="type === 'unknown'">Don't know how to display this...</span>
|
<span v-if="type === 'unknown'">Don't know how to display this...</span>
|
||||||
|
|
||||||
<div v-if="type === 'html' && attachment.oembed" class="oembed">
|
<div v-if="type === 'html' && attachment.oembed" class="oembed">
|
||||||
|
@ -42,6 +44,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
audio {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
img.media-upload {
|
img.media-upload {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
Loading…
Reference in a new issue