diff --git a/source/Ox.UI/js/Video/VideoPlayer.js b/source/Ox.UI/js/Video/VideoPlayer.js index 91d0d8df..9a701695 100644 --- a/source/Ox.UI/js/Video/VideoPlayer.js +++ b/source/Ox.UI/js/Video/VideoPlayer.js @@ -14,8 +14,10 @@ Ox.VideoPlayer Generic Video Player controlsBottom <[s]|[]> Bottom controls, from left to right Can be 'close', fullscreen', 'scale', 'title', 'find', 'open', 'play', 'playInToOut', 'previous', 'next', 'mute', 'volume', 'size', - 'timeline', 'space', 'position', 'settings'. The 'space' control is - empty space that separates left-aligned from right-aligned controls. + 'timeline', 'position', 'settings', and 'space[int]'. A 'space16' + control, for example, is empty space that is 16px wide, and a + 'space' control is empty space that separates left-aligned from + right-aligned controls. controlsTooltips Tooltip text per control id controlsTop <[s]|[]> Top controls, from left to right duration Duration (sec) @@ -882,6 +884,15 @@ Ox.VideoPlayer = function(options, self) { .html(' ') // fixme: ?? .appendTo(self['$controls' + titleCase].$element); + } else if (Ox.startsWith(control, 'space')) { + + $('
') + .css({ + width: parseInt(control.substr(5)) + 'px', + height: '16px' + }) + .appendTo(self['$controls' + titleCase].$element); + } else if (control == 'timeline') { /* @@ -1553,8 +1564,10 @@ Ox.VideoPlayer = function(options, self) { return (self.options.fullscreen ? window.innerWidth : self.options.width) - self.options.controlsBottom.reduce(function(prev, curr) { return prev + ( - curr == 'timeline' || curr == 'space' ? 0 : - curr == 'position' ? getPositionWidth() : 16 + curr == 'timeline' || curr == 'space' ? 0 + : Ox.startsWith(curr, 'space') ? parseInt(curr.substr(5)) + : curr == 'position' ? getPositionWidth() + : 16 ); }, 0); } @@ -1563,7 +1576,9 @@ Ox.VideoPlayer = function(options, self) { return (self.options.fullscreen ? window.innerWidth : self.options.width) - self.options.controlsTop.reduce(function(prev, curr) { return prev + ( - curr == 'title' || curr == 'space' ? 0 : 16 + curr == 'title' || curr == 'space' ? 0 + : Ox.startsWith(curr, 'space') ? parseInt(curr.substr(5)) + : 16 ); }, 0); }