diff --git a/source/Ox.UI/js/Video/VideoPlayer.js b/source/Ox.UI/js/Video/VideoPlayer.js index 233fa56b..3262fdbc 100644 --- a/source/Ox.UI/js/Video/VideoPlayer.js +++ b/source/Ox.UI/js/Video/VideoPlayer.js @@ -735,9 +735,7 @@ Ox.VideoPlayer = function(options, self) { } else if (control == 'position') { - self.positionWidth = 48 - + !!self.options.showMilliseconds * 2 - + self.options.showMilliseconds * 6; + self.positionWidth = getPositionWidth(); self.$position = Ox.Element({ 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() { self.videoCSS = getVideoCSS(); 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) { return prev + ( curr == 'timeline' || curr == 'space' ? 0 : - curr == 'position' ? self.positionWidth : 16 + curr == 'position' ? getPositionWidth() : 16 ); }, 0); }