From f062c6001e0f2da4c53e8be7d8648ba3cf24c59d Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Fri, 23 Dec 2011 07:15:40 +0000 Subject: [PATCH] fix video player bugs --- source/Ox.UI/js/List/Ox.List.js | 12 +++++++++--- source/Ox.UI/js/Video/Ox.VideoPlayer.js | 9 +++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 7153ec98..1b2dbcc5 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -1293,9 +1293,15 @@ Ox.List = function(options, self) { }, rest ? { rest: rest } : {})); - self.preview && that.triggerEvent('openpreview', { - ids: ids - }); + if (self.preview) { + if (ids.length) { + that.triggerEvent('openpreview', { + ids: ids + }); + } else { + that.triggerEvent('closepreview'); + } + } } }); }, 100); diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js index 4171af0a..7349a431 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js +++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js @@ -1066,7 +1066,9 @@ Ox.VideoPlayer = function(options, self) { hideControls(); } }); - that.find('.OxControls').bind({ + showControls(); + hideControls(); + that.$element.find('.OxControls').bind({ mouseenter: function() { self.mouseIsInControls = true; }, @@ -1074,8 +1076,6 @@ Ox.VideoPlayer = function(options, self) { self.mouseIsInControls = false; } }); - showControls(); - hideControls(); that.gainFocus(); } @@ -1311,6 +1311,7 @@ Ox.VideoPlayer = function(options, self) { 'in': self.options['in'], out: self.options.out, paused: self.options.paused, + position: self.options.position, results: self.results, showMilliseconds: self.options.showMilliseconds, subtitles: self.options.subtitles, @@ -2129,7 +2130,7 @@ Ox.VideoPlayer = function(options, self) { enterFullscreen(); }); } else { - // flag makes the animation end on absolute position + // exitFullscreen flag makes the animation end on absolute position self.exitFullscreen = true; that.unbind('mousemove'); that.find('.OxControls')