diff --git a/demos/video/js/video.js b/demos/video/js/video.js index 915c0c4b..e8580fc5 100644 --- a/demos/video/js/video.js +++ b/demos/video/js/video.js @@ -9,9 +9,23 @@ Ox.load('UI', { padding: '16px' }); Ox.VideoPlayer({ - height: 288, + height: 96 * 256/180, + timeline: timeline, + title: 'Brick', + url: url, + width: 256 + }).appendTo(Ox.UI.$body); + /* + var id = '0133093'; + var url = 'http://next.0xdb.org/' + id + '/96p.webm?' + Ox.random(1000000); + var timeline = 'http://next.0xdb.org/' + id + '/timeline.16.png'; + Ox.VideoPlayer({ + height: 96 * 256/230, timeline: timeline, url: url, - width: 540 + width: 256 + }).css({ + left: '300px' }).appendTo(Ox.UI.$body); + */ }); diff --git a/source/Ox.UI/css/Ox.UI.css b/source/Ox.UI/css/Ox.UI.css index 9182d11c..fa080f0c 100644 --- a/source/Ox.UI/css/Ox.UI.css +++ b/source/Ox.UI/css/Ox.UI.css @@ -1647,6 +1647,7 @@ Video margin-left: 4px; } + .OxVideoPlayer > .OxBar .OxInputGroup { //width: 98px; } diff --git a/source/Ox.UI/js/Core/Ox.Focus.js b/source/Ox.UI/js/Core/Ox.Focus.js index 5f5e0e39..5103387e 100644 --- a/source/Ox.UI/js/Core/Ox.Focus.js +++ b/source/Ox.UI/js/Core/Ox.Focus.js @@ -13,6 +13,10 @@ Ox.Focus = function() { _print: function() { Ox.print(stack); }, + _reset: function() { + $('.OxFocus').removeClass('OxFocus'); + stack = []; + }, blur: function(id) { var index = stack.indexOf(id); if (index > -1 && index == stack.length - 1) { diff --git a/source/Ox.UI/js/Form/Ox.Input.js b/source/Ox.UI/js/Form/Ox.Input.js index 36f276fc..efc9f891 100644 --- a/source/Ox.UI/js/Form/Ox.Input.js +++ b/source/Ox.UI/js/Form/Ox.Input.js @@ -729,12 +729,18 @@ Ox.Input = function(options, self) { } }; - that.focusInput = function() { + that.focusInput = function(select) { + select = Ox.isUndefined(select) ? true : select; self.$input.focus(); - cursor(0, self.$input.val().length); + if (select) { + cursor(0, self.$input.val().length); + } else { + cursor(self.$input.val().length); + } return that; }; + // fixme: deprecate, options are enough that.value = function() { return self.$input.hasClass('OxPlaceholder') ? '' : self.$input.val(); }; diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index 3d29aba4..cf7976cc 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -11,6 +11,7 @@ Ox.VideoPlayer = function(options, self) { }) .options(options || {}) .css({ + position: 'absolute', width: self.options.width + 'px', height: self.options.height + 'px' //background: 'red' @@ -27,9 +28,7 @@ Ox.VideoPlayer = function(options, self) { self.barHeight = 16; self.outerBarWidth = self.options.width - 96; self.innerBarWidth = self.outerBarWidth - self.barHeight; - self.markerSize = 12; - self.markerBorderSize = 2; - self.markerOffset = -self.innerBarWidth - self.markerSize / 2; + self.markerOffset = -self.innerBarWidth - 8; self.$video = Ox.VideoElement({ height: self.options.height, @@ -44,10 +43,12 @@ Ox.VideoPlayer = function(options, self) { loadedmetadata: loadedmetadata, paused: function(data) { // called when playback ends + /* self.$playButton.toggleTitle(); - self.$positionMarker.css({ - borderColor: 'rgb(192, 192, 192)' + self.$positionMarkerRing.css({ + borderColor: 'rgba(255, 255, 255, 0.5)' }); + */ }, playing: function(data) { setPosition(data.position); @@ -60,7 +61,7 @@ Ox.VideoPlayer = function(options, self) { if (self.buffered[i][0] > self.buffered[i][1]) { self.buffered[i][0] = 0; } - Ox.print(i, self.buffered[i][0], self.buffered[i][1]) + //Ox.print(i, self.buffered[i][0], self.buffered[i][1]) } self.$buffered.attr({ src: getBufferedImageURL() @@ -72,14 +73,33 @@ Ox.VideoPlayer = function(options, self) { }) .appendTo(that); + if (self.options.title) { + self.$titlebar = $('