move full minute check from player into panel and editor, should fix #716
This commit is contained in:
parent
17aca54e7a
commit
8e6787be97
3 changed files with 12 additions and 13 deletions
|
@ -1124,6 +1124,8 @@ Ox.VideoEditor = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPosition(position, playing) {
|
function setPosition(position, playing) {
|
||||||
|
var minute = minute = parseInt(position / 60),
|
||||||
|
previousMinute = parseInt(self.options.position / 60);
|
||||||
self.options.position = position;
|
self.options.position = position;
|
||||||
!playing && self.$player[0].options({
|
!playing && self.$player[0].options({
|
||||||
position: self.options.position
|
position: self.options.position
|
||||||
|
@ -1136,10 +1138,12 @@ Ox.VideoEditor = function(options, self) {
|
||||||
self.$annotationPanel.options({
|
self.$annotationPanel.options({
|
||||||
position: self.options.position
|
position: self.options.position
|
||||||
});
|
});
|
||||||
!playing && that.triggerEvent('position', {
|
if (!playing || minute != previousMinute) {
|
||||||
|
that.triggerEvent('position', {
|
||||||
position: self.options.position
|
position: self.options.position
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setSizes() {
|
function setSizes() {
|
||||||
self.sizes = getSizes();
|
self.sizes = getSizes();
|
||||||
|
|
|
@ -131,7 +131,6 @@ Ox.VideoPanel = function(options, self) {
|
||||||
},
|
},
|
||||||
position: function(data) {
|
position: function(data) {
|
||||||
setPosition(data.position);
|
setPosition(data.position);
|
||||||
that.triggerEvent('position', data);
|
|
||||||
},
|
},
|
||||||
resolution: function(data) {
|
resolution: function(data) {
|
||||||
that.triggerEvent('resolution', data);
|
that.triggerEvent('resolution', data);
|
||||||
|
@ -369,10 +368,15 @@ Ox.VideoPanel = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setPosition(position, playing) {
|
function setPosition(position, playing) {
|
||||||
|
var minute = minute = parseInt(position / 60),
|
||||||
|
previousMinute = parseInt(self.options.position / 60);
|
||||||
self.options.position = position;
|
self.options.position = position;
|
||||||
!playing && self.$video.options({position: self.options.position});
|
!playing && self.$video.options({position: self.options.position});
|
||||||
self.$timeline.options({position: self.options.position});
|
self.$timeline.options({position: self.options.position});
|
||||||
self.$annotationPanel.options({position: self.options.position});
|
self.$annotationPanel.options({position: self.options.position});
|
||||||
|
if (!playing || minute != previousMinute) {
|
||||||
|
that.triggerEvent('position', {position: self.options.position});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sortAnnotations(a, b) {
|
function sortAnnotations(a, b) {
|
||||||
|
|
|
@ -1694,10 +1694,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function playing() {
|
function playing() {
|
||||||
var minute,
|
|
||||||
previousMinute = parseInt(self.options.position / 60);
|
|
||||||
self.options.position = self.$video.currentTime();
|
self.options.position = self.$video.currentTime();
|
||||||
minute = parseInt(self.options.position / 60);
|
|
||||||
if (
|
if (
|
||||||
(self.playInToOut && self.options.position >= self.options.out)
|
(self.playInToOut && self.options.position >= self.options.out)
|
||||||
|| (self.options.playInToOut && self.options.position >= self.out)
|
|| (self.options.playInToOut && self.options.position >= self.out)
|
||||||
|
@ -1721,12 +1718,6 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
that.triggerEvent('playing', {
|
that.triggerEvent('playing', {
|
||||||
position: self.options.position
|
position: self.options.position
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
temporarily disabled
|
|
||||||
minute != previousMinute && that.triggerEvent('position', {
|
|
||||||
position: minute * 60
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function playInToOut() {
|
function playInToOut() {
|
||||||
|
|
Loading…
Reference in a new issue