]> _ Git - fluidbook-html5.git/commitdiff
fix #4095 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Nov 2020 16:33:08 +0000 (17:33 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 24 Nov 2020 16:33:08 +0000 (17:33 +0100)
js/libs/fluidbook/fluidbook.support.js
js/libs/modernizr/tests.js
style/fluidbook.video.less

index 576a828720a84a9069f61e5be2a4d327608cd04e..13550159126d62ab2f6b45fa7dc0f741039e2b33 100644 (file)
@@ -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;
 
index c4720a918dcfea4d5ebde646f1d90243a891f58c..35cca3c38adfd90bf36bf18e97708131d8aa74e2 100644 (file)
@@ -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);
 });
index 848a16b919ffe9c7ab8f78764206bfe820af6bdd..20cef0331273cf4f4fe21c25371cb710e0597a44 100644 (file)
@@ -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