diff --git a/js/dom-functions.js b/js/dom-functions.js index 091ccb0..72745e4 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -2322,7 +2322,8 @@ function buildAttachmentHTML(attachments){ // if there's a local thumb_url we assume this is a image or video else if(typeof this.thumb_url != 'undefined' && this.thumb_url !== null - && isLocalURL(this.thumb_url)) { + && isLocalURL(this.thumb_url) + && !($.inArray(this.mimetype, ['video/mp4', 'video/ogg', 'video/quicktime', 'video/webm']) >=0)) { var bigThumbW = 1000; var bigThumbH = 3000; if(bigThumbW > window.siteMaxThumbnailSize) { @@ -2390,6 +2391,15 @@ function buildAttachmentHTML(attachments){ urlsToHide.push(urlToHide); // hide this attachment url from the queet text attachmentNum++; } + else if ($.inArray(this.mimetype, ['video/mp4', 'video/ogg', 'video/quicktime', 'video/webm']) >=0) { + var posterAttribute = ''; + if(typeof this.thumb_url != 'undefined' + && this.thumb_url !== null + && isLocalURL(this.thumb_url)) { + posterAttribute = 'poster="' + this.thumb_url + '"'; + } + attachmentHTML += '
'; + } }); } return { html: ' ',