From d9dfa9f0c68599159a9dd2af36813bdefe84271d Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 14 Jul 2013 19:52:18 +0000 Subject: [PATCH] video player with external controls: fix css and fullscreen --- source/Ox.UI/css/theme.css | 4 ++-- source/Ox.UI/js/Video/VideoPlayer.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/css/theme.css b/source/Ox.UI/css/theme.css index f2ec1bc0..05bb853f 100644 --- a/source/Ox.UI/css/theme.css +++ b/source/Ox.UI/css/theme.css @@ -1037,8 +1037,8 @@ Video border-color: $videoTimelineMarkerShadow; } -.$themeClass .OxVideoPlayer .OxControls, -.$themeClass .OxVideoPlayer .OxControls .OxFind { +.$themeClass .OxVideoPlayer .OxControls.OxOnScreen, +.$themeClass .OxVideoPlayer .OxControls.OxOnScreen .OxFind { background-image: -moz-linear-gradient(top, $videoBarGradient); background-image: -o-linear-gradient(top, $videoBarGradient); background-image: -webkit-linear-gradient(top, $videoBarGradient); diff --git a/source/Ox.UI/js/Video/VideoPlayer.js b/source/Ox.UI/js/Video/VideoPlayer.js index ede2f481..03bcf611 100644 --- a/source/Ox.UI/js/Video/VideoPlayer.js +++ b/source/Ox.UI/js/Video/VideoPlayer.js @@ -2449,6 +2449,11 @@ Ox.VideoPlayer = function(options, self) { zIndex: 1000 }) .appendTo(Ox.UI.$body); + if (self.options.externalControls) { + self.externalControls = true; + self.options.externalControls = false; + self.$videoContainer.css({top: 0}); + } setSizes(true, function() { playOnFullscreen && self.$video.play(); enterFullscreen(); @@ -2461,6 +2466,10 @@ Ox.VideoPlayer = function(options, self) { .trigger('mouseleave') .off('mouseenter mouseleave'); clearTimeout(self.interfaceTimeout); + if (self.externalControls) { + self.options.externalControls = true; + self.$videoContainer.css({top: '16px'}); + } setSizes(true, function() { self.exitFullscreen = false; that.detach()