1
0
Fork 0
forked from 0x2620/oxjs

cosmetic changes

This commit is contained in:
rlx 2013-07-14 17:46:03 +00:00
commit 34a734e9f6
3 changed files with 9 additions and 7 deletions

View file

@ -181,7 +181,7 @@ Ox.VideoElement = function(options, self) {
item.duration = item.out - item['in'];
}
if (item.duration) {
if(!item.out) {
if (!item.out) {
item.out = item.duration - item['in'];
}
currentTime += item.duration;
@ -192,7 +192,7 @@ Ox.VideoElement = function(options, self) {
Ox.Log('VIDEO', 'getVideoInfo', item.src);
Ox.getVideoInfo(item.src, function(info) {
item.duration = info.duration;
if(!item.out) {
if (!item.out) {
item.out = item['in'] + item.duration;
}
currentTime += item.duration;
@ -235,7 +235,7 @@ Ox.VideoElement = function(options, self) {
function setCurrentItem(item) {
Ox.Log('Video', 'sCI', item, self.numberOfItems);
var interval;
if(item >= self.numberOfItems || item < 0) {
if (item >= self.numberOfItems || item < 0) {
if (self.options.loop) {
item = Ox.mod(item, self.numberOfItems);
} else {
@ -318,9 +318,9 @@ Ox.VideoElement = function(options, self) {
return false;
}
});
if(self.items.length) {
if (self.items.length) {
// Set to end of items if time > duration
if(Ox.isUndefined(currentItem) && Ox.isUndefined(currentTime)) {
if (Ox.isUndefined(currentItem) && Ox.isUndefined(currentTime)) {
currentItem = self.items.length -1;
currentTime = self.items[currentItem].duration + self.items[currentItem]['in'];
}