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) {
|
||||
var minute = minute = parseInt(position / 60),
|
||||
previousMinute = parseInt(self.options.position / 60);
|
||||
self.options.position = position;
|
||||
!playing && self.$player[0].options({
|
||||
position: self.options.position
|
||||
|
@ -1136,9 +1138,11 @@ Ox.VideoEditor = function(options, self) {
|
|||
self.$annotationPanel.options({
|
||||
position: self.options.position
|
||||
});
|
||||
!playing && that.triggerEvent('position', {
|
||||
position: self.options.position
|
||||
});
|
||||
if (!playing || minute != previousMinute) {
|
||||
that.triggerEvent('position', {
|
||||
position: self.options.position
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setSizes() {
|
||||
|
|
|
@ -131,7 +131,6 @@ Ox.VideoPanel = function(options, self) {
|
|||
},
|
||||
position: function(data) {
|
||||
setPosition(data.position);
|
||||
that.triggerEvent('position', data);
|
||||
},
|
||||
resolution: function(data) {
|
||||
that.triggerEvent('resolution', data);
|
||||
|
@ -369,10 +368,15 @@ Ox.VideoPanel = function(options, self) {
|
|||
}
|
||||
|
||||
function setPosition(position, playing) {
|
||||
var minute = minute = parseInt(position / 60),
|
||||
previousMinute = parseInt(self.options.position / 60);
|
||||
self.options.position = position;
|
||||
!playing && self.$video.options({position: self.options.position});
|
||||
self.$timeline.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) {
|
||||
|
|
|
@ -1694,10 +1694,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function playing() {
|
||||
var minute,
|
||||
previousMinute = parseInt(self.options.position / 60);
|
||||
self.options.position = self.$video.currentTime();
|
||||
minute = parseInt(self.options.position / 60);
|
||||
if (
|
||||
(self.playInToOut && self.options.position >= self.options.out)
|
||||
|| (self.options.playInToOut && self.options.position >= self.out)
|
||||
|
@ -1721,12 +1718,6 @@ Ox.VideoPlayer = function(options, self) {
|
|||
that.triggerEvent('playing', {
|
||||
position: self.options.position
|
||||
});
|
||||
/*
|
||||
temporarily disabled
|
||||
minute != previousMinute && that.triggerEvent('position', {
|
||||
position: minute * 60
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function playInToOut() {
|
||||
|
|
Loading…
Reference in a new issue