expose paused as option in VideoEdito and VideoPlayerPanel
This commit is contained in:
parent
d9c69a0975
commit
033155cc51
2 changed files with 12 additions and 3 deletions
|
@ -43,6 +43,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
layers: [],
|
layers: [],
|
||||||
muted: false,
|
muted: false,
|
||||||
out: 0,
|
out: 0,
|
||||||
|
paused: true,
|
||||||
position: 0,
|
position: 0,
|
||||||
posterFrame: 0,
|
posterFrame: 0,
|
||||||
resolution: 0,
|
resolution: 0,
|
||||||
|
@ -253,7 +254,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
'in': self.options['in'],
|
'in': self.options['in'],
|
||||||
muted: self.options.muted,
|
muted: self.options.muted,
|
||||||
out: self.options.out,
|
out: self.options.out,
|
||||||
paused: true,
|
paused: self.options.paused,
|
||||||
position: type == 'play' ? self.options.position : self.options[type],
|
position: type == 'play' ? self.options.position : self.options[type],
|
||||||
posterFrame: self.options.posterFrame,
|
posterFrame: self.options.posterFrame,
|
||||||
resolution: self.options.resolution,
|
resolution: self.options.resolution,
|
||||||
|
@ -280,6 +281,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
that.triggerEvent('muted', data);
|
that.triggerEvent('muted', data);
|
||||||
},
|
},
|
||||||
paused: function(data) {
|
paused: function(data) {
|
||||||
|
self.options.paused = data.paused;
|
||||||
that.triggerEvent('paused', data);
|
that.triggerEvent('paused', data);
|
||||||
},
|
},
|
||||||
playing: function(data) {
|
playing: function(data) {
|
||||||
|
@ -1390,6 +1392,10 @@ Ox.VideoEditor = function(options, self) {
|
||||||
setSizes();
|
setSizes();
|
||||||
} else if (key == 'in' || key == 'out') {
|
} else if (key == 'in' || key == 'out') {
|
||||||
setPoint(key, value);
|
setPoint(key, value);
|
||||||
|
} else if (key == 'paused') {
|
||||||
|
self.$player[0].options({
|
||||||
|
paused: value
|
||||||
|
});
|
||||||
} else if (key == 'position') {
|
} else if (key == 'position') {
|
||||||
setPosition(value);
|
setPosition(value);
|
||||||
} else if (key == 'selected') {
|
} else if (key == 'selected') {
|
||||||
|
|
|
@ -37,7 +37,7 @@ Ox.VideoPanel = function(options, self) {
|
||||||
loop: false, // fixme: used?
|
loop: false, // fixme: used?
|
||||||
muted: false,
|
muted: false,
|
||||||
out: 0,
|
out: 0,
|
||||||
paused: false,
|
paused: true,
|
||||||
playInToOut: false,
|
playInToOut: false,
|
||||||
position: 0,
|
position: 0,
|
||||||
poster: '',
|
poster: '',
|
||||||
|
@ -103,7 +103,7 @@ Ox.VideoPanel = function(options, self) {
|
||||||
'in': self.options['in'],
|
'in': self.options['in'],
|
||||||
muted: self.options.muted,
|
muted: self.options.muted,
|
||||||
out: self.options.out,
|
out: self.options.out,
|
||||||
paused: true,
|
paused: self.options.paused,
|
||||||
position: self.options.position,
|
position: self.options.position,
|
||||||
resolution: self.options.resolution,
|
resolution: self.options.resolution,
|
||||||
scaleToFill: self.options.scaleToFill,
|
scaleToFill: self.options.scaleToFill,
|
||||||
|
@ -132,6 +132,7 @@ Ox.VideoPanel = function(options, self) {
|
||||||
that.triggerEvent('muted', data);
|
that.triggerEvent('muted', data);
|
||||||
},
|
},
|
||||||
paused: function(data) {
|
paused: function(data) {
|
||||||
|
self.options.paused = data.paused;
|
||||||
that.triggerEvent('paused', data);
|
that.triggerEvent('paused', data);
|
||||||
},
|
},
|
||||||
playing: function(data) {
|
playing: function(data) {
|
||||||
|
@ -454,6 +455,8 @@ Ox.VideoPanel = function(options, self) {
|
||||||
self.$video.options({height: getPlayerHeight()});
|
self.$video.options({height: getPlayerHeight()});
|
||||||
} else if (key == 'in' || key == 'out') {
|
} else if (key == 'in' || key == 'out') {
|
||||||
setPoint(key, value);
|
setPoint(key, value);
|
||||||
|
} else if (key == 'paused') {
|
||||||
|
self.$video.options({paused: value});
|
||||||
} else if (key == 'position') {
|
} else if (key == 'position') {
|
||||||
self.$video.options({position: value});
|
self.$video.options({position: value});
|
||||||
self.$timeline.options({position: value});
|
self.$timeline.options({position: value});
|
||||||
|
|
Loading…
Reference in a new issue