Make video features work with .ogv videos.
This commit is contained in:
parent
38be18e867
commit
115390fde3
@ -133,7 +133,7 @@ Gallery =
|
|||||||
|
|
||||||
load: (thumb, errorCB) ->
|
load: (thumb, errorCB) ->
|
||||||
ext = thumb.href.match /\w*$/
|
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
|
file = $.el elType
|
||||||
$.extend file.dataset, thumb.dataset
|
$.extend file.dataset, thumb.dataset
|
||||||
$.on file, 'error', errorCB
|
$.on file, 'error', errorCB
|
||||||
|
|||||||
@ -271,7 +271,7 @@ Config =
|
|||||||
]
|
]
|
||||||
'Replace WEBM': [
|
'Replace WEBM': [
|
||||||
false
|
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': [
|
'Image Prefetching': [
|
||||||
true
|
true
|
||||||
|
|||||||
@ -491,7 +491,7 @@ $.unescape = (text) ->
|
|||||||
(({'&': '&', ''': "'", '"': '"', '<': '<', '>': '>', ',': ','})[c])
|
(({'&': '&', ''': "'", '"': '"', '<': '<', '>': '>', ',': ','})[c])
|
||||||
|
|
||||||
$.isImage = (url) -> /\.(jpe?g|png|gif|bmp|webp)$/i.test url
|
$.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 ->
|
$.engine = do ->
|
||||||
return 'edge' if /Edge\//.test navigator.userAgent
|
return 'edge' if /Edge\//.test navigator.userAgent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user