loop or stop if going to item -1, fixes #1637

This commit is contained in:
j 2013-07-10 13:34:31 +00:00
parent 538d45ce57
commit 1759fa6b69

View file

@ -225,7 +225,7 @@ Ox.VideoElement = function(options, self) {
function setCurrentItem(item) { function setCurrentItem(item) {
Ox.Log('Video', 'sCI', item, self.numberOfItems); Ox.Log('Video', 'sCI', item, self.numberOfItems);
var interval; var interval;
if(item >= self.numberOfItems) { if(item >= self.numberOfItems || item < 0) {
if (self.options.loop) { if (self.options.loop) {
item = Ox.mod(item, self.numberOfItems); item = Ox.mod(item, self.numberOfItems);
} else { } else {