Quellcode durchsuchen

Isolate object-fit fix for Windows Qt browser only

master
yanas vor 8 Jahren
Ursprung
Commit
da0898a066

+ 0
- 7
css/videolayout_default.css Datei anzeigen

@@ -41,13 +41,6 @@
41 41
     background-size: contain;
42 42
     border-radius:1px;
43 43
     border: 1px solid #212425;
44
-    /**
45
-      * Some browsers don't have full support of the object-fit property for the
46
-      * video element and when we set video object-fit to "cover" the video
47
-      * actually overflows the boundaries of its container, so it's important
48
-      * to indicate that the "overflow" should be hidden.
49
-      */
50
-    overflow: hidden;
51 44
 }
52 45
 
53 46
 #remoteVideos .videocontainer.videoContainerFocused {

+ 2
- 0
modules/UI/videolayout/LocalVideo.js Datei anzeigen

@@ -21,6 +21,8 @@ function LocalVideo(VideoLayout, emitter) {
21 21
             return APP.conference.getMyUserId();
22 22
         }
23 23
     });
24
+    this.initBrowserSpecificProperties();
25
+
24 26
     SmallVideo.call(this, VideoLayout);
25 27
 }
26 28
 

+ 3
- 0
modules/UI/videolayout/RemoteVideo.js Datei anzeigen

@@ -27,6 +27,9 @@ RemoteVideo.prototype.constructor = RemoteVideo;
27 27
 
28 28
 RemoteVideo.prototype.addRemoteVideoContainer = function() {
29 29
     this.container = RemoteVideo.createContainer(this.videoSpanId);
30
+
31
+    this.initBrowserSpecificProperties();
32
+
30 33
     if (APP.conference.isModerator) {
31 34
         this.addRemoteVideoMenu();
32 35
     }

+ 21
- 0
modules/UI/videolayout/SmallVideo.js Datei anzeigen

@@ -528,4 +528,25 @@ SmallVideo.prototype.waitForResolutionChange = function() {
528 528
     };
529 529
 };
530 530
 
531
+/**
532
+ * Initalizes any browser specific properties. Currently sets the overflow
533
+ * property for Qt browsers on Windows to hidden, thus fixing the following
534
+ * problem:
535
+ * Some browsers don't have full support of the object-fit property for the
536
+ * video element and when we set video object-fit to "cover" the video
537
+ * actually overflows the boundaries of its container, so it's important
538
+ * to indicate that the "overflow" should be hidden.
539
+ *
540
+ * Setting this property for all browsers will result in broken audio levels,
541
+ * which makes this a temporary solution, before reworking audio levels.
542
+ */
543
+SmallVideo.prototype.initBrowserSpecificProperties = function() {
544
+
545
+    var userAgent = window.navigator.userAgent;
546
+    if (userAgent.indexOf("QtWebEngine") > -1
547
+        && userAgent.indexOf("Windows") > -1) {
548
+        $('#' + this.videoSpanId).css("overflow", "hidden");
549
+    }
550
+};
551
+
531 552
 export default SmallVideo;

Laden…
Abbrechen
Speichern