Add mp4 to attachments.
This commit is contained in:
parent
2917f4ab44
commit
15800bab57
|
@ -19,8 +19,8 @@ const Attachment = {
|
||||||
type = 'image';
|
type = 'image';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.attachment.mimetype.match(/video\/webm/)) {
|
if(this.attachment.mimetype.match(/video\/(webm|mp4)/)) {
|
||||||
type = 'webm';
|
type = 'video';
|
||||||
};
|
};
|
||||||
|
|
||||||
return type
|
return type
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<a class="image-attachment" v-if="type === 'image' && !nsfw" :href="attachment.url" target="_blank"><img :src="attachment.url"></img></a>
|
<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>
|
<span v-if="type === 'unknown'">Don't know how to display this...</span>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue