forked from 0x2620/oxjs
video editor improvements
This commit is contained in:
parent
f8ec3fccf4
commit
a1deb20f97
8 changed files with 89 additions and 50 deletions
|
|
@ -20,9 +20,9 @@ Ox.VideoEditor = function(options, self) {
|
|||
find: '',
|
||||
frameURL: function() {},
|
||||
fps: 25,
|
||||
getFrameURL: null,
|
||||
getLargeTimelineImageURL: null,
|
||||
getSmallTimelineImageURL: null,
|
||||
getVideoImageURL: null,
|
||||
'in': 0,
|
||||
height: 0,
|
||||
largeTimeline: true,
|
||||
|
|
@ -75,7 +75,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
setPoint('in');
|
||||
},
|
||||
key_left: function() {
|
||||
movePositionBy(-1);
|
||||
movePositionBy(-0.04);
|
||||
},
|
||||
key_o: function() {
|
||||
setPoint('out');
|
||||
|
|
@ -85,7 +85,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
},
|
||||
key_p: playInToOut,
|
||||
key_right: function() {
|
||||
movePositionBy(1);
|
||||
movePositionBy(0.04);
|
||||
},
|
||||
key_s: function() {
|
||||
// toggleSize
|
||||
|
|
@ -100,7 +100,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
movePositionBy(self.options.duration);
|
||||
},
|
||||
key_shift_left: function() {
|
||||
movePositionBy(-0.04);
|
||||
movePositionBy(1);
|
||||
//movePositionBy(-60);
|
||||
},
|
||||
key_shift_i: function() {
|
||||
|
|
@ -110,11 +110,11 @@ Ox.VideoEditor = function(options, self) {
|
|||
goToPoint('out');
|
||||
},
|
||||
key_shift_right: function() {
|
||||
movePositionBy(0.04);
|
||||
movePositionBy(1);
|
||||
//movePositionBy(60);
|
||||
},
|
||||
key_shift_up: function() {
|
||||
movePositionBy(-self.options.duration);
|
||||
movePositionBy(-self.options.position);
|
||||
},
|
||||
key_slash: function() {
|
||||
select('cut');
|
||||
|
|
@ -144,7 +144,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
['play', 'in', 'out'].forEach(function(type, i) {
|
||||
self.$player[i] = new Ox.VideoPlayer({
|
||||
controlsBottom: type == 'play' ?
|
||||
['play', 'playInToOut', 'mute', 'size', 'space', 'position'] :
|
||||
['play', 'playInToOut', 'volume', 'size', 'space', 'position'] :
|
||||
['goto', 'set', 'space', 'position'],
|
||||
duration: self.options.duration,
|
||||
externalControls: true,
|
||||
|
|
@ -160,7 +160,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
showMilliseconds: 2,
|
||||
subtitles: self.options.subtitles,
|
||||
type: type,
|
||||
video: type == 'play' ? self.options.video : self.options.getVideoImageURL,
|
||||
video: type == 'play' ? self.options.video : self.options.getFrameURL,
|
||||
width: self.sizes.player[i].width
|
||||
})
|
||||
.css({
|
||||
|
|
@ -512,8 +512,11 @@ Ox.VideoEditor = function(options, self) {
|
|||
}
|
||||
|
||||
function setPoint(point) {
|
||||
var otherPoint = point == 'in' ? 'out' : 'in';
|
||||
self.options[point] = self.options.position;
|
||||
self.$player[0].options(point, self.options[point]);
|
||||
self.$player.forEach(function($player) {
|
||||
$player.options(point, self.options[point]);
|
||||
});
|
||||
self.$player[point == 'in' ? 1 : 2].options({
|
||||
position: self.options[point]
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue