video player: add internal getPositionWidth method
This commit is contained in:
parent
17bdb6ccd9
commit
d3e74f85f8
1 changed files with 7 additions and 4 deletions
|
@ -735,9 +735,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
|
|
||||||
} else if (control == 'position') {
|
} else if (control == 'position') {
|
||||||
|
|
||||||
self.positionWidth = 48
|
self.positionWidth = getPositionWidth();
|
||||||
+ !!self.options.showMilliseconds * 2
|
|
||||||
+ self.options.showMilliseconds * 6;
|
|
||||||
|
|
||||||
self.$position = Ox.Element({
|
self.$position = Ox.Element({
|
||||||
tooltip: self.options.type == 'play' ? 'Position'
|
tooltip: self.options.type == 'play' ? 'Position'
|
||||||
|
@ -1415,6 +1413,11 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPositionWidth() {
|
||||||
|
return 48 + !!self.options.showMilliseconds * 2
|
||||||
|
+ self.options.showMilliseconds * 6;
|
||||||
|
}
|
||||||
|
|
||||||
function getPosterMarkerCSS() {
|
function getPosterMarkerCSS() {
|
||||||
self.videoCSS = getVideoCSS();
|
self.videoCSS = getVideoCSS();
|
||||||
var left = Math.floor((self.videoCSS.width - self.videoCSS.height) / 2),
|
var left = Math.floor((self.videoCSS.width - self.videoCSS.height) / 2),
|
||||||
|
@ -1541,7 +1544,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
self.options.controlsBottom.reduce(function(prev, curr) {
|
self.options.controlsBottom.reduce(function(prev, curr) {
|
||||||
return prev + (
|
return prev + (
|
||||||
curr == 'timeline' || curr == 'space' ? 0 :
|
curr == 'timeline' || curr == 'space' ? 0 :
|
||||||
curr == 'position' ? self.positionWidth : 16
|
curr == 'position' ? getPositionWidth() : 16
|
||||||
);
|
);
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue