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