diff --git a/js/dom-functions.js b/js/dom-functions.js index 156344f..32a6c3d 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -2354,7 +2354,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) { @@ -2422,6 +2423,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: ' ',