forked from 0x2620/oxjs
updates for players, timelines and markers
This commit is contained in:
parent
9a7a0acd89
commit
18f117138d
9 changed files with 213 additions and 184 deletions
|
|
@ -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'
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue