eliminate Video.configure
This commit is contained in:
parent
a995d5ecb1
commit
43b12523d4
@ -158,7 +158,10 @@ Gallery =
|
|||||||
$.extend file.dataset, @dataset
|
$.extend file.dataset, @dataset
|
||||||
nodes.current.pause?()
|
nodes.current.pause?()
|
||||||
$.replace nodes.current, file
|
$.replace nodes.current, file
|
||||||
Video.configure file if elType is 'video'
|
if elType is 'video'
|
||||||
|
file.loop = true
|
||||||
|
file.controls = Conf['Show Controls']
|
||||||
|
Video.start file if Conf['Autoplay']
|
||||||
nodes.count.textContent = +@dataset.id + 1
|
nodes.count.textContent = +@dataset.id + 1
|
||||||
nodes.current = file
|
nodes.current = file
|
||||||
nodes.frame.scrollTop = 0
|
nodes.frame.scrollTop = 0
|
||||||
|
|||||||
@ -153,7 +153,10 @@ ImageExpand =
|
|||||||
post.file.isExpanded = true
|
post.file.isExpanded = true
|
||||||
if post.file.isVideo
|
if post.file.isVideo
|
||||||
ImageExpand.setupVideoControls post
|
ImageExpand.setupVideoControls post
|
||||||
Video.configure post.file.fullImage, disableAutoplay
|
video = post.file.fullImage
|
||||||
|
video.loop = true
|
||||||
|
video.controls = Conf['Show Controls']
|
||||||
|
Video.start video if Conf['Autoplay'] and not disableAutoplay
|
||||||
|
|
||||||
videoCB: do ->
|
videoCB: do ->
|
||||||
# dragging to the left contracts the video
|
# dragging to the left contracts the video
|
||||||
|
|||||||
@ -1,13 +1,4 @@
|
|||||||
Video =
|
Video =
|
||||||
configure: (video, disableAutoplay) ->
|
|
||||||
video.loop = true
|
|
||||||
video.controls = Conf['Show Controls']
|
|
||||||
video.autoplay = false
|
|
||||||
if Conf['Autoplay'] and not disableAutoplay
|
|
||||||
Video.start video
|
|
||||||
else
|
|
||||||
video.pause()
|
|
||||||
|
|
||||||
start: (video) ->
|
start: (video) ->
|
||||||
return unless video.paused
|
return unless video.paused
|
||||||
{controls} = video
|
{controls} = video
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user