Browse Source

Merge pull request #776 from jitsi/isolate-object-fix-browser-specific

Isolate object-fit fix for Windows Qt browser only
master
Дамян Минков 9 years ago
parent
commit
a50a980de4

+ 0
- 7
css/videolayout_default.css View File

41
     background-size: contain;
41
     background-size: contain;
42
     border-radius:1px;
42
     border-radius:1px;
43
     border: 1px solid #212425;
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
 #remoteVideos .videocontainer.videoContainerFocused {
46
 #remoteVideos .videocontainer.videoContainerFocused {

+ 2
- 0
modules/UI/videolayout/LocalVideo.js View File

21
             return APP.conference.getMyUserId();
21
             return APP.conference.getMyUserId();
22
         }
22
         }
23
     });
23
     });
24
+    this.initBrowserSpecificProperties();
25
+
24
     SmallVideo.call(this, VideoLayout);
26
     SmallVideo.call(this, VideoLayout);
25
 }
27
 }
26
 
28
 

+ 3
- 0
modules/UI/videolayout/RemoteVideo.js View File

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

+ 21
- 0
modules/UI/videolayout/SmallVideo.js View File

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
 export default SmallVideo;
552
 export default SmallVideo;

Loading…
Cancel
Save