merge
This commit is contained in:
commit
e1d8e2aeea
3 changed files with 21 additions and 12 deletions
|
@ -526,7 +526,7 @@ Ox.URL = function(options) {
|
||||||
}
|
}
|
||||||
if (!state.span && /^[A-Z@]/.test(parts[0])) {
|
if (!state.span && /^[A-Z@]/.test(parts[0])) {
|
||||||
// test for span id or name
|
// test for span id or name
|
||||||
self.options.getSpan(state.item, state.view, parts[0].replace(/%20/g, ' '), function(span, view) {
|
self.options.getSpan(state.item, state.view, decodeValue(parts[0]), function(span, view) {
|
||||||
Ox.Log('Core', 'span/view', span, view)
|
Ox.Log('Core', 'span/view', span, view)
|
||||||
if (span) {
|
if (span) {
|
||||||
if (!state.view) {
|
if (!state.view) {
|
||||||
|
@ -708,4 +708,4 @@ Ox.URL = function(options) {
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -471,6 +471,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
setPosition(self.options.posterFrame);
|
setPosition(self.options.posterFrame);
|
||||||
} else if (id == 'setPosterFrame') {
|
} else if (id == 'setPosterFrame') {
|
||||||
self.options.posterFrame = self.options.position;
|
self.options.posterFrame = self.options.position;
|
||||||
|
self.$player.forEach(function($player) {
|
||||||
|
$player.options('posterFrame', self.options.posterFrame);
|
||||||
|
});
|
||||||
that.triggerEvent('posterframe', {
|
that.triggerEvent('posterframe', {
|
||||||
position: self.options.posterFrame
|
position: self.options.posterFrame
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,7 +23,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.css({width: '100%', height: '100%'});
|
.css({width: '100%', height: '100%'});
|
||||||
|
|
||||||
Ox.Log('Video', 'VIDEO ELEMENT OPTIONS', self.options)
|
Ox.Log('Video', 'VIDEO ELEMENT OPTIONS', self.options);
|
||||||
|
|
||||||
self.items = [];
|
self.items = [];
|
||||||
self.paused = true;
|
self.paused = true;
|
||||||
|
@ -64,7 +64,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
function getset(key, value) {
|
function getset(key, value) {
|
||||||
var ret;
|
var ret;
|
||||||
if (Ox.isUndefined(value)) {
|
if (Ox.isUndefined(value)) {
|
||||||
ret = self.video[key]
|
ret = self.video[key];
|
||||||
} else {
|
} else {
|
||||||
self.video[key] = value;
|
self.video[key] = value;
|
||||||
ret = that;
|
ret = that;
|
||||||
|
@ -73,7 +73,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadPage(page, callback) {
|
function loadPage(page, callback) {
|
||||||
Ox.Log('Video', 'VIDEO loadPage', page)
|
Ox.Log('Video', 'VIDEO loadPage', page);
|
||||||
//page = Ox.mod(page, self.numberOfPages);
|
//page = Ox.mod(page, self.numberOfPages);
|
||||||
var loadedmetadata = 0,
|
var loadedmetadata = 0,
|
||||||
start = page * self.pageLength,
|
start = page * self.pageLength,
|
||||||
|
@ -84,14 +84,14 @@ Ox.VideoElement = function(options, self) {
|
||||||
data.forEach(function(data, i) {
|
data.forEach(function(data, i) {
|
||||||
self.items[start + i] = loadItem(data.parts, data.points, function(item) {
|
self.items[start + i] = loadItem(data.parts, data.points, function(item) {
|
||||||
if (++loadedmetadata == pageLength) {
|
if (++loadedmetadata == pageLength) {
|
||||||
Ox.Log('Video', 'VIDEO page', page, 'loaded')
|
Ox.Log('Video', 'VIDEO page', page, 'loaded');
|
||||||
callback && callback();
|
callback && callback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Ox.Log('Video', 'PAGE IN CACHE')
|
Ox.Log('Video', 'PAGE IN CACHE');
|
||||||
callback && callback();
|
callback && callback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,9 @@ Ox.VideoElement = function(options, self) {
|
||||||
|
|
||||||
function setCurrentPart(part) {
|
function setCurrentPart(part) {
|
||||||
Ox.Log('Video', 'sCP', part);
|
Ox.Log('Video', 'sCP', part);
|
||||||
var css = {};
|
var css = {},
|
||||||
|
muted = false,
|
||||||
|
volume = 1;
|
||||||
['left', 'top', 'width', 'height'].forEach(function(key) {
|
['left', 'top', 'width', 'height'].forEach(function(key) {
|
||||||
css[key] = self.$video.css(key);
|
css[key] = self.$video.css(key);
|
||||||
});
|
});
|
||||||
|
@ -244,12 +246,16 @@ Ox.VideoElement = function(options, self) {
|
||||||
self.$video.hide();
|
self.$video.hide();
|
||||||
self.video.pause();
|
self.video.pause();
|
||||||
self.video.currentTime = 0;
|
self.video.currentTime = 0;
|
||||||
|
volume = self.video.volume;
|
||||||
|
muted = self.video.muted;
|
||||||
}
|
}
|
||||||
self.$video = self.items[self.currentItem].$videos[part].css(css).show();
|
self.$video = self.items[self.currentItem].$videos[part].css(css).show();
|
||||||
self.video = self.$video[0];
|
self.video = self.$video[0];
|
||||||
|
self.video.volume = volume;
|
||||||
|
self.video.muted = muted;
|
||||||
!self.paused && self.video.play();
|
!self.paused && self.video.play();
|
||||||
self.currentPart = part;
|
self.currentPart = part;
|
||||||
Ox.Log('Video', 'sCP', part, self.video.src)
|
Ox.Log('Video', 'sCP', part, self.video.src);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCurrentTime(time) {
|
function setCurrentTime(time) {
|
||||||
|
@ -272,7 +278,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
|
|
||||||
function unloadPage(page) {
|
function unloadPage(page) {
|
||||||
//page = Ox.mod(page, self.numberOfPages);
|
//page = Ox.mod(page, self.numberOfPages);
|
||||||
Ox.Log('Video', 'unloadPage', page)
|
Ox.Log('Video', 'unloadPage', page);
|
||||||
var start = page * self.pageLength,
|
var start = page * self.pageLength,
|
||||||
stop = Math.min(start + self.pageLength, self.numberOfItems);
|
stop = Math.min(start + self.pageLength, self.numberOfItems);
|
||||||
Ox.range(start, stop).forEach(function(i) {
|
Ox.range(start, stop).forEach(function(i) {
|
||||||
|
@ -397,7 +403,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
playNext <f> play next
|
playNext <f> play next
|
||||||
@*/
|
@*/
|
||||||
that.playNext = function() {
|
that.playNext = function() {
|
||||||
Ox.Log('Video', 'PLAY NEXT')
|
Ox.Log('Video', 'PLAY NEXT');
|
||||||
setCurrentItem(self.currentItem + 1);
|
setCurrentItem(self.currentItem + 1);
|
||||||
self.video.play();
|
self.video.play();
|
||||||
};
|
};
|
||||||
|
@ -448,7 +454,7 @@ Ox.VideoElement = function(options, self) {
|
||||||
@*/
|
@*/
|
||||||
that.volume = function(value) {
|
that.volume = function(value) {
|
||||||
return getset('volume', arguments[0]);
|
return getset('volume', arguments[0]);
|
||||||
}
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue