Enable video controls!

This commit is contained in:
Zixaphir 2014-04-10 23:36:45 -07:00
parent 88b0b0b32f
commit 586a048d6e
4 changed files with 25 additions and 18 deletions

View File

@ -44,8 +44,7 @@ module.exports = (grunt) ->
meta:
files:
'LICENSE': 'src/General/meta/banner.js',
'latest.js': 'src/General/meta/latest.js'
'LICENSE': 'src/General/meta/banner.js'
crx:
files:

View File

@ -7868,13 +7868,6 @@
next: function() {
return Gallery.cb.open.call(Gallery.images[+Gallery.nodes.current.dataset.id + 1]);
},
advance: function() {
if (Gallery.nodes.current.paused) {
return Gallery.nodes.current.play();
} else {
return Gallery.cb.next();
}
},
toggle: function() {
return (Gallery.nodes ? Gallery.cb.close : Gallery.build)();
},
@ -7883,6 +7876,15 @@
return Gallery.cb.close();
}
},
advance: function() {
if (Gallery.nodes.current.controls) {
return;
}
if (Gallery.nodes.current.paused) {
return Gallery.nodes.current.play();
}
return Gallery.cb.next();
},
pause: function() {
var current;
current = Gallery.nodes.current;

View File

@ -7907,13 +7907,6 @@
next: function() {
return Gallery.cb.open.call(Gallery.images[+Gallery.nodes.current.dataset.id + 1]);
},
advance: function() {
if (Gallery.nodes.current.paused) {
return Gallery.nodes.current.play();
} else {
return Gallery.cb.next();
}
},
toggle: function() {
return (Gallery.nodes ? Gallery.cb.close : Gallery.build)();
},
@ -7922,6 +7915,15 @@
return Gallery.cb.close();
}
},
advance: function() {
if (Gallery.nodes.current.controls) {
return;
}
if (Gallery.nodes.current.paused) {
return Gallery.nodes.current.play();
}
return Gallery.cb.next();
},
pause: function() {
var current;
current = Gallery.nodes.current;

View File

@ -214,11 +214,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'