no chapters
This commit is contained in:
parent
0dfed9de74
commit
543045ae6c
1 changed files with 9 additions and 7 deletions
|
@ -1794,20 +1794,22 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
function goToNext(type, direction) {
|
function goToNext(type, direction) {
|
||||||
// type can be 'chapter' or 'result'
|
// type can be 'chapter' or 'result'
|
||||||
var position, positions;
|
var position, positions;
|
||||||
if (type == 'chapter') {
|
if (type == 'chapter' && self.options.chapters) {
|
||||||
positions = self.options.chapters.map(function(chapter) {
|
positions = self.options.chapters.map(function(chapter) {
|
||||||
return chapter.position;
|
return chapter.position;
|
||||||
});
|
});
|
||||||
} else if (type == 'result') {
|
} else if (type == 'result' && self.results) {
|
||||||
positions = Ox.unique(self.results.map(function(result) {
|
positions = Ox.unique(self.results.map(function(result) {
|
||||||
return result['in'];
|
return result['in'];
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
position = Ox.nextValue(positions, self.options.position, direction);
|
if (positions) {
|
||||||
setPosition(position);
|
position = Ox.nextValue(positions, self.options.position, direction);
|
||||||
that.triggerEvent('position', {
|
setPosition(position);
|
||||||
position: self.options.position
|
that.triggerEvent('position', {
|
||||||
});
|
position: self.options.position
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function goToPoint() {
|
function goToPoint() {
|
||||||
|
|
Loading…
Reference in a new issue