Make video features work with .ogv videos.

This commit is contained in:
ccd0 2020-06-16 01:55:26 -07:00
parent 38be18e867
commit 115390fde3
3 changed files with 3 additions and 3 deletions

View File

@ -133,7 +133,7 @@ Gallery =
load: (thumb, errorCB) ->
ext = thumb.href.match /\w*$/
elType = $.getOwn({'webm': 'video', 'mp4': 'video', 'pdf': 'iframe'}, ext) or 'img'
elType = $.getOwn({'webm': 'video', 'mp4': 'video', 'ogv': 'video', 'pdf': 'iframe'}, ext) or 'img'
file = $.el elType
$.extend file.dataset, thumb.dataset
$.on file, 'error', errorCB

View File

@ -271,7 +271,7 @@ Config =
]
'Replace WEBM': [
false
'Replace webm and mp4 thumbnails with the actual video. Probably will degrade browser performance ;)'
'Replace webm, mp4, and ogv thumbnails with the actual video. Probably will degrade browser performance ;)'
]
'Image Prefetching': [
true

View File

@ -491,7 +491,7 @@ $.unescape = (text) ->
(({'&amp;': '&', '&#039;': "'", '&quot;': '"', '&lt;': '<', '&gt;': '>', '&#44;': ','})[c])
$.isImage = (url) -> /\.(jpe?g|png|gif|bmp|webp)$/i.test url
$.isVideo = (url) -> /\.(webm|mp4)$/i.test url
$.isVideo = (url) -> /\.(webm|mp4|ogv)$/i.test url
$.engine = do ->
return 'edge' if /Edge\//.test navigator.userAgent