diff --git a/source/Ox.UI/js/Video/VideoEditPanel.js b/source/Ox.UI/js/Video/VideoEditPanel.js index 1ef8c90f..7df41e9c 100644 --- a/source/Ox.UI/js/Video/VideoEditPanel.js +++ b/source/Ox.UI/js/Video/VideoEditPanel.js @@ -99,12 +99,25 @@ Ox.VideoEditPanel = function(options, self) { .bindEvent({ //resize: resizeElement, key_0: toggleMuted, + key_control_c: function() { + that.triggerEvent('copy', [{ + annotation: self.options.selected, + 'in': self.options['in'], + out: self.options.out + }]); + }, key_equal: function() { self.$video.changeVolume(0.1); }, + key_i: function() { + setPoint('in', self.options.position, true); + }, key_minus: function() { self.$video.changeVolume(-0.1); }, + key_o: function() { + setPoint('out', self.options.position, true); + }, key_space: togglePaused }); @@ -322,7 +335,7 @@ Ox.VideoEditPanel = function(options, self) { .bindEvent({ mousedown: that.gainFocus, position: changeTimeline - }) + }); } function getTimelineWidth() { @@ -359,11 +372,21 @@ Ox.VideoEditPanel = function(options, self) { that.triggerEvent('select', {id: self.options.selected}); } - function setPoint(point, position) { + function setPoint(point, position, triggerEvent) { self.options[point] = position; self.$video.options(point, position); self.$timeline.options(point, position); self.$clipPanel.options(point, position); + if (self.options['in'] > self.options.out) { + setPoint(point == 'in' ? 'out' : 'in', position); + } + if (triggerEvent) { + that.triggerEvent('points', { + 'in': self.options['in'], + out: self.options.out, + position: self.options.position + }); + } } function setPosition(position, playing) { diff --git a/source/Ox.UI/js/Video/VideoPanel.js b/source/Ox.UI/js/Video/VideoPanel.js index d5602a17..66233fc5 100644 --- a/source/Ox.UI/js/Video/VideoPanel.js +++ b/source/Ox.UI/js/Video/VideoPanel.js @@ -19,8 +19,8 @@ Ox.VideoPanel VideoPanel Object position position resizecalendar resizecalendar resolution resolution - scale scale - select select + scaleToFill scale + selected select subtitles subtitles toggleannotations toggleannotations togglecalendar togglecalendar @@ -126,12 +126,27 @@ Ox.VideoPanel = function(options, self) { .bindEvent({ resize: resizeElement, key_0: toggleMuted, + key_control_c: function() { + that.triggerEvent('copy', [{ + annotation: self.options.selected, + 'in': self.options['in'], + out: self.options.out + }]); + }, key_equal: function() { self.$video.changeVolume(0.1); }, + key_i: function() { + self.$annotationPanel.options({selected: ''}); + setPoint('in', self.options.position, true); + }, key_minus: function() { self.$video.changeVolume(-0.1); }, + key_o: function() { + self.$annotationPanel.options({selected: ''}); + setPoint('out', self.options.position, true); + }, key_space: togglePaused }); @@ -433,11 +448,21 @@ Ox.VideoPanel = function(options, self) { that.triggerEvent('select', {id: self.options.selected}); } - function setPoint(point, position) { + function setPoint(point, position, triggerEvent) { self.options[point] = position; self.$video.options(point, position); self.$timeline.options(point, position); self.$annotationPanel.options(point, position); + if (self.options['in'] > self.options.out) { + setPoint(point == 'in' ? 'out' : 'in', position); + } + if (triggerEvent) { + that.triggerEvent('points', { + 'in': self.options['in'], + out: self.options.out, + position: self.options.position + }); + } } function setPosition(position, playing) {