From 1bf3ce1bc91666cd0adc5d38e4f932469ada6c00 Mon Sep 17 00:00:00 2001 From: csantosm <4a.santos@gmail.com> Date: Thu, 24 Feb 2022 13:02:00 +0100 Subject: [PATCH] openvidu-components: Fixed layout bug. The layout has a bad UX. The root element is created with the entire layout width and it has a weird UX behaviour. Custom class with no width and height has been added and removed dynamically when stream container is present. --- .../components/layout/layout.component.css | 21 ++++--------------- .../components/layout/layout.component.html | 1 - .../components/stream/stream.component.css | 7 +++++++ .../components/stream/stream.component.html | 2 +- .../lib/components/stream/stream.component.ts | 12 ++++------- .../lib/components/video/video.component.ts | 5 +++-- .../src/lib/models/layout.model.ts | 3 ++- .../lib/services/document/document.service.ts | 5 +++++ .../src/lib/services/layout/layout.service.ts | 2 +- .../lib/services/openvidu/openvidu.service.ts | 8 +------ 10 files changed, 28 insertions(+), 38 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.css b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.css index 73b24935..1027a0cd 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.css +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.css @@ -22,9 +22,6 @@ * http://opensource.org/licenses/MIT */ - .custom-class { - min-height: 0px !important; - } /** * OT Base styles @@ -38,9 +35,7 @@ padding: 0; border: 0; font-size: 100%; - font-family: 'Ubuntu', sans-serif; vertical-align: baseline; - transition: all .1s linear; } .OT_dialog-centering { @@ -220,9 +215,11 @@ .OT_publisher, .OT_subscriber { position: relative; - min-width: 48px; - min-height: 48px; + min-width: 0px; + min-height: 0px; margin: 1px; + transition-duration: 0.1s; + transition-timing-function: ease-in-out; } .OT_publisher .OT_video-element, @@ -231,20 +228,10 @@ position: absolute; width: 100%; height: 100%; - -webkit-transform-origin: 0 0; - transform-origin: 0 0; } - /* Styles that are applied when the video element should be mirrored */ - .OT_publisher.OT_mirrored .OT_video-element { - -webkit-transform: scale(-1, 1); - transform: scale(-1, 1); - -webkit-transform-origin: 50% 50%; - transform-origin: 50% 50%; - } - .OT_subscriber_error { background-color: #000; color: #fff; diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html index cdf2de43..ca9c8403 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.html @@ -1,7 +1,6 @@