forked from 0x2620/oxjs
video panel: suport in/out/copy; video edit panel: support in/out
This commit is contained in:
parent
155ada7992
commit
410e157cac
2 changed files with 53 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue