WebMs with sound sighted on /wsg/!
This commit is contained in:
parent
525ad213dc
commit
43454eae88
@ -244,6 +244,10 @@ Config =
|
|||||||
true
|
true
|
||||||
'Show controls on videos expanded inline.'
|
'Show controls on videos expanded inline.'
|
||||||
]
|
]
|
||||||
|
'Allow Sound': [
|
||||||
|
true
|
||||||
|
'Allow sound in videos.'
|
||||||
|
]
|
||||||
'Loop in New Tab': [
|
'Loop in New Tab': [
|
||||||
true
|
true
|
||||||
'Loop videos opened in their own tabs.'
|
'Loop videos opened in their own tabs.'
|
||||||
|
|||||||
@ -147,6 +147,7 @@ Gallery =
|
|||||||
$.replace nodes.current, file
|
$.replace nodes.current, file
|
||||||
if elType is 'video'
|
if elType is 'video'
|
||||||
file.loop = true
|
file.loop = true
|
||||||
|
file.muted = !Conf['Allow Sound']
|
||||||
file.play() if Conf['Autoplay']
|
file.play() if Conf['Autoplay']
|
||||||
ImageCommon.addControls file if Conf['Show Controls']
|
ImageCommon.addControls file if Conf['Show Controls']
|
||||||
nodes.count.textContent = +thumb.dataset.id + 1
|
nodes.count.textContent = +thumb.dataset.id + 1
|
||||||
|
|||||||
@ -172,6 +172,7 @@ ImageExpand =
|
|||||||
thumb.parentNode.removeAttribute 'target'
|
thumb.parentNode.removeAttribute 'target'
|
||||||
|
|
||||||
el.loop = true
|
el.loop = true
|
||||||
|
el.muted = !Conf['Allow Sound']
|
||||||
|
|
||||||
if !isVideo
|
if !isVideo
|
||||||
$.asap (-> el.naturalHeight), -> ImageExpand.completeExpand post
|
$.asap (-> el.naturalHeight), -> ImageExpand.completeExpand post
|
||||||
|
|||||||
@ -38,6 +38,7 @@ ImageHover =
|
|||||||
if isVideo
|
if isVideo
|
||||||
el.loop = true
|
el.loop = true
|
||||||
el.controls = false
|
el.controls = false
|
||||||
|
el.muted = !Conf['Allow Sound']
|
||||||
el.play() if Conf['Autoplay']
|
el.play() if Conf['Autoplay']
|
||||||
[width, height] = file.dimensions.split('x').map (x) -> +x
|
[width, height] = file.dimensions.split('x').map (x) -> +x
|
||||||
{left, right} = @getBoundingClientRect()
|
{left, right} = @getBoundingClientRect()
|
||||||
|
|||||||
@ -46,6 +46,7 @@ ImageLoader =
|
|||||||
video = $.el 'video',
|
video = $.el 'video',
|
||||||
preload: 'none'
|
preload: 'none'
|
||||||
loop: true
|
loop: true
|
||||||
|
muted: true
|
||||||
poster: thumb.src
|
poster: thumb.src
|
||||||
textContent: thumb.alt
|
textContent: thumb.alt
|
||||||
className: thumb.className
|
className: thumb.className
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user