From a1294a927e677cf70ac1552e06ef63d293e052b6 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 24 Nov 2020 17:33:08 +0100 Subject: [PATCH] fix #4095 @0:20 --- js/libs/fluidbook/fluidbook.support.js | 8 ++++---- js/libs/modernizr/tests.js | 6 +++++- style/fluidbook.video.less | 28 +++++++++++++++----------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.support.js b/js/libs/fluidbook/fluidbook.support.js index 576a8287..13550159 100644 --- a/js/libs/fluidbook/fluidbook.support.js +++ b/js/libs/fluidbook/fluidbook.support.js @@ -7,12 +7,12 @@ function FluidbookSupport(fluidbook) { this.IE = navigator.userAgent.match(/(MSIE |Trident.*rv[ :])([0-9]+)/)[2]; } catch (e) { } - this.macOs = navigator.platform.toUpperCase().indexOf('MAC') >= 0; - this.safari = navigator.vendor === "Apple Computer, Inc."; - this.android = this.fitScreenAtZero = this.userAgent.search(/android/i) > -1 || this.userAgent.search(/galaxy/i) > -1; + this.macOs = Modernizr.macos; + this.safari = Modernizr.safari; + this.android = this.fitScreenAtZero = Modernizr.android; this.android3 = this.android && this.userAgent.search(/android 3/i) > -1; this.iOS = Modernizr.ios; - this.edge = this.userAgent.search(/edge/i) > -1; + this.edge = Modernizr.edge; // If in node-webkit or if the index.html fluidbook is locally open in a browser this.offline = (typeof process !== "undefined" && process.versions['node-webkit']) || window.location.toString().indexOf("file://") == 0; diff --git a/js/libs/modernizr/tests.js b/js/libs/modernizr/tests.js index c4720a91..35cca3c3 100644 --- a/js/libs/modernizr/tests.js +++ b/js/libs/modernizr/tests.js @@ -19,7 +19,7 @@ Modernizr.addTest('ipod', function () { }); Modernizr.addTest('android', function () { - return !!navigator.userAgent.match(/android/i); + return !!(navigator.userAgent.match(/android/i) || navigator.userAgent.search(/galaxy/i) > -1); }); Modernizr.addTest('ios', function () { @@ -50,6 +50,10 @@ Modernizr.addTest('safari', function () { return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor); }); +Modernizr.addTest('macos', function () { + return navigator.platform.toUpperCase().indexOf('MAC') >= 0; +}); + Modernizr.addTest('edge', function () { return !!navigator.userAgent.match(/edge/i); }); diff --git a/style/fluidbook.video.less b/style/fluidbook.video.less index 848a16b9..20cef033 100644 --- a/style/fluidbook.video.less +++ b/style/fluidbook.video.less @@ -2,29 +2,33 @@ // Hide big play button on ios (#3682) *::-webkit-media-controls-start-playback-button { - display: none !important; - -webkit-appearance: none; + display: none !important; + -webkit-appearance: none; } .mview .videoContainer { - width: 100%; - height: 100%; + width: 100%; + height: 100%; } .mview .videoContainer video, .mview .videoContainer object, .webvideo { - position: static; - width: 100%; - height: auto; - display: block; - background-color: transparent !important; - margin: 0 auto; + position: static; + width: 100%; + height: auto; + display: block; + background-color: transparent !important; + margin: 0 auto; } .videoContainer { - position: relative; + position: relative; } .video-js button { - cursor: pointer; + cursor: pointer; +} + +.macos.safari video.vjs-tech { + opacity: 0.999; } \ No newline at end of file -- 2.39.5