implement 'censored' option in timeline player

This commit is contained in:
rlx 2012-04-18 11:21:06 +00:00
parent c70271573a
commit c7d8d68607

View file

@ -7,6 +7,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
censored: [],
cuts: [],
duration: 0,
find: '',
@ -256,15 +257,17 @@ Ox.VideoTimelinePlayer = function(options, self) {
})
.appendTo(self.$timelines[self.videoLines[1]][0]);
self.$frame = $('<img>')
.attr({
src: self.options.getFrameURL(self.options.position)
self.$frame = Ox.VideoPlayer({
censored: self.options.censored,
duration: self.options.duration,
height: self.tileHeight,
position: self.options.position,
scaleToFill: true,
type: 'in',
video: self.options.getFrameURL,
width: self.videoWidth
})
.css({
width: self.videoWidth + 'px',
height: self.tileHeight + 'px',
})
.appendTo(self.$frameBox)
.appendTo(self.$frameBox);
$('<div>')
.addClass('OxFrameInterface')
@ -292,6 +295,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
.appendTo(self.$timelines[self.videoLines[0]][0]);
self.$video = Ox.VideoPlayer({
censored: self.options.censored,
duration: self.options.duration,
height: self.tileHeight,
paused: self.options.paused,
@ -588,12 +592,10 @@ Ox.VideoTimelinePlayer = function(options, self) {
isPlaying && self.$video.togglePaused();
}
if (videoLines[0] != videoLines[1]) {
self.$frame.attr({
src: self.options.getFrameURL(
self.paused
? self.options.position
: Math.floor(self.options.position)
)
self.$frame.options({
position: self.paused
? self.options.position
: Math.floor(self.options.position)
});
}
if (
@ -608,9 +610,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
}
if (!fromVideo) {
self.$video.options({position: self.options.position});
self.$frame.attr({
src: self.options.getFrameURL(self.options.position)
});
self.$frame.options({position: self.options.position});
scrollToPosition();
}
self.$smallTimeline.options({position: self.options.position});