From 67dab205d3d98238a95fa205583304f840d88fec Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Thu, 10 Apr 2014 23:36:45 -0700 Subject: [PATCH] Enable video controls! --- src/Images/Gallery.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index b1890f650..9a6353535 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -196,11 +196,15 @@ Gallery = prev: -> Gallery.cb.open.call Gallery.images[+Gallery.nodes.current.dataset.id - 1] next: -> Gallery.cb.open.call Gallery.images[+Gallery.nodes.current.dataset.id + 1] - advance: -> if Gallery.nodes.current.paused then Gallery.nodes.current.play() else Gallery.cb.next() toggle: -> (if Gallery.nodes then Gallery.cb.close else Gallery.build)() blank: (e) -> Gallery.cb.close() if e.target is @ - pause: -> + advance: -> + if Gallery.nodes.current.controls then return + if Gallery.nodes.current.paused then return Gallery.nodes.current.play() + Gallery.cb.next() + + pause: -> {current} = Gallery.nodes current[if current.paused then 'play' else 'pause']() if current.nodeType is 'VIDEO'