aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlambadalambda <gitgud@rogerbraun.net>2016-11-23 17:03:45 -0500
committerlambadalambda <gitgud@rogerbraun.net>2016-11-23 17:03:45 -0500
commite30485fe471fa6c2eaa91e12e6d5579156707cc7 (patch)
treeedefbf32f1fc7b5c64b3db0889cfaa1330cbfd9f /src
parentea697a1bb16ee8cb38044d112592538da146814a (diff)
parent3210283ae2783952c3724be188f2db8132885a38 (diff)
Merge branch 'feature/audio-upload-improvements' into 'develop'
Add audio player See merge request !4
Diffstat (limited to 'src')
-rw-r--r--src/components/attachment/attachment.js4
-rw-r--r--src/components/attachment/attachment.vue6
2 files changed, 10 insertions, 0 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 99958589..47ca03de 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -23,6 +23,10 @@ const Attachment = {
type = 'video'
};
+ if (this.attachment.mimetype.match(/ogg|audio/)) {
+ type = 'audio'
+ }
+
return type
}
},
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 0e2a228a..4e8c1407 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -8,6 +8,8 @@
<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>
<div v-if="type === 'html' && attachment.oembed" class="oembed">
@@ -42,6 +44,10 @@
width: 100%;
}
+ audio {
+ width: 100%;
+ }
+
img.media-upload {
width: 100%;
height: 100%;