diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-11-24 18:38:36 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-11-24 18:38:36 +0100 |
| commit | b645f1d0ba41b9265735033a1f762470ac54b34f (patch) | |
| tree | f5dbf45292b7fed02064b618165cd8fcdbc15ed1 /src | |
| parent | 4f0155c5eb532fea6cde2aea870824f936923132 (diff) | |
| parent | e30485fe471fa6c2eaa91e12e6d5579156707cc7 (diff) | |
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma-fe into develop
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/attachment/attachment.js | 4 | ||||
| -rw-r--r-- | src/components/attachment/attachment.vue | 6 |
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%; |
