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

@ -15,6 +15,7 @@ Ox.BlockVideoTimeline = function(options, self) {
width: 0
})
.options(options || {})
.addClass('OxBlockVideoTimeline')
.css({
position: 'absolute',
//background: 'rgba(192, 192, 192, 0.1)'
@ -62,14 +63,9 @@ Ox.BlockVideoTimeline = function(options, self) {
self.$positionMarker = $('<img>')
.attr({
src: Ox.UI.getImageURL('markerPlay')
})
.css({
position: 'absolute',
width: '9px',
height: '9px',
zIndex: 10
src: Ox.UI.getImageURL('markerPosition')
})
.addClass('OxMarkerPosition')
.appendTo(that.$element);
setPositionMarker();
@ -77,17 +73,10 @@ Ox.BlockVideoTimeline = 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',
width: '6px',
height: '6px',
marginLeft: (point == 'in' ? -1 : 4) + 'px',
zIndex: 10
})
.appendTo(that.$element);
setPointMarker(point);
});
@ -205,13 +194,13 @@ Ox.BlockVideoTimeline = function(options, self) {
self.$pointMarker[point].css({
left: (position % self.options.width) + 'px',
top: (parseInt(position / self.options.width) *
(self.height + self.margin) + 16) + 'px'
(self.height + self.margin) + 15) + 'px'
});
}
function setPositionMarker() {
self.$positionMarker.css({
left: (self.options.position % self.options.width) + 'px',
left: (self.options.position % self.options.width) - 1 + 'px',
top: (parseInt(self.options.position / self.options.width) *
(self.height + self.margin) + 2) + 'px'
});