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) {
|
||||
|
|
|
@ -19,8 +19,8 @@ Ox.VideoPanel <f> 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) {
|
||||
|
|
Loading…
Reference in a new issue