1
0
Fork 0
forked from 0x2620/oxjs

make +/- volume keyboard shortcut work in video and timeline views

This commit is contained in:
rlx 2012-02-19 11:21:52 +00:00
commit 7d188d8621
5 changed files with 46 additions and 19 deletions

View file

@ -62,6 +62,12 @@ Ox.VideoPanel = function(options, self) {
.bindEvent({
resize: resizeElement,
key_0: toggleMuted,
key_equal: function() {
self.$video.changeVolume(0.1);
},
key_minus: function() {
self.$video.changeVolume(-0.1);
},
key_space: togglePaused
});
@ -239,9 +245,9 @@ Ox.VideoPanel = function(options, self) {
});
[
'0', 'b', 'backslash', 'closebracket', 'comma', 'dot',
'f', 'g', 'i', 'n', 'o', 'openbracket', 'p',
'shift_0', 'shift_g', 'shift_i', 'shift_o', 'slash', 'space'
'0', 'b', 'backslash', 'closebracket', 'comma', 'dot', 'equal', 'f',
'g', 'i', 'minus', 'n', 'o', 'openbracket', 'p', 'shift_0', 'shift_g',
'shift_i', 'shift_o', 'slash', 'space'
].forEach(function(key) {
key = 'key_' + key;
self.$annotationPanel.bindEvent(key, function() {