1
0
Fork 0
forked from 0x2620/oxjs

updates for players, timelines and markers

This commit is contained in:
rlx 2011-09-02 03:28:43 +00:00
commit 18f117138d
9 changed files with 213 additions and 184 deletions

View file

@ -71,43 +71,14 @@ Ox.SmallVideoTimeline = function(options, self) {
if (self.options.type == 'player') {
self.$positionMarker = $('<div>')
.css({
position: 'absolute',
width: '14px',
height: '14px',
border: '1px solid rgba(0, 0, 0, 0.5)',
borderRadius: '8px'
})
.append(
self.$positionMarkerRing = $('<div>')
.css({
width: '10px',
height: '10px',
border: '2px solid rgba(255, 255, 255, ' + (self.options.paused ? 0.5 : 1) + ')',
borderRadius: '7px',
})
.append(
$('<div>')
.css({
width: '8px',
height: '8px',
border: '1px solid rgba(0, 0, 0, 0.5)',
borderRadius: '5px',
})
)
)
.addClass('OxMarkerPlay' + (self.options.paused ? ' OxPaused' : ''))
.append($('<div>').append($('<div>')))
.appendTo(that.$element);
} else {
self.$positionMarker = $('<img>')
.addClass('OxMarkerPosition')
.attr({
src: Ox.UI.getImageURL('markerPlay')
})
.css({
position: 'absolute',
top: '2px',
width: '9px',
height: '9px',
zIndex: 10
src: Ox.UI.getImageURL('markerPosition')
})
.appendTo(that.$element);
}
@ -118,18 +89,10 @@ Ox.SmallVideoTimeline = function(options, self) {
['in', 'out'].forEach(function(point) {
var titlecase = Ox.toTitleCase(point);
self.$pointMarker[point] = $('<img>')
.addClass('OxPointMarker' + titlecase)
.addClass('OxMarkerPoint' + titlecase)
.attr({
src: Ox.UI.getImageURL('marker' + titlecase)
})
.css({
position: 'absolute',
top: '16px',
width: '6px',
height: '6px',
marginLeft: (point == 'in' ? -1 : 4) + 'px',
zIndex: 10
})
.appendTo(that.$element);
setPointMarker(point);
});
@ -213,7 +176,7 @@ Ox.SmallVideoTimeline = function(options, self) {
self.$positionMarker.css({
left: self.interfaceLeft + Math.round(
self.options.position * self.imageWidth / self.options.duration
) - (self.options.type == 'editor' ? 4 : 0) + self.options._offset + 'px'
) - (self.options.type == 'editor' ? 5 : 0) + self.options._offset + 'px'
});
}
@ -256,9 +219,9 @@ Ox.SmallVideoTimeline = function(options, self) {
});
setPointMarker('out');
} else if (key == 'paused') {
self.$positionMarkerRing.css({
borderColor: 'rgba(255, 255, 255, ' + (self.options.paused ? 0.5 : 1) + ')'
})
self.$positionMarker[
self.options.paused ? 'addClass' : 'removeClass'
]('OxPaused');
} else if (key == 'position') {
setPositionMarker();
} else if (key == 'results') {