Add mp4 to attachments.

This commit is contained in:
Roger Braun 2016-11-06 17:43:31 +01:00
parent 2917f4ab44
commit 15800bab57
2 changed files with 3 additions and 3 deletions

View File

@ -19,8 +19,8 @@ const Attachment = {
type = 'image';
}
if(this.attachment.mimetype.match(/video\/webm/)) {
type = 'webm';
if(this.attachment.mimetype.match(/video\/(webm|mp4)/)) {
type = 'video';
};
return type

View File

@ -6,7 +6,7 @@
<a class="image-attachment" v-if="type === 'image' && !nsfw" :href="attachment.url" target="_blank"><img :src="attachment.url"></img></a>
<video v-if="type === 'webm' && !nsfw" :src="attachment.url" controls></video>
<video v-if="type === 'video' && !nsfw" :src="attachment.url" controls></video>
<span v-if="type === 'unknown'">Don't know how to display this...</span>