mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-13 10:34:37 +00:00
By adding viewport-fit=cover to the <meta name="viewport"> header, the page now requests to be displayed edge-to-edge across the entire screen. This gives us control over what we display around camera cut-outs and system navigation UI, if the user agent supports it. I then adjusted the styles of various UI elements to ensure that they still lie within the screen's safe area.
88 lines
1.6 KiB
CSS
88 lines
1.6 KiB
CSS
/*
|
|
Copyright 2022-2024 New Vector Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE in the repository root for full details.
|
|
*/
|
|
|
|
.preview {
|
|
margin-left: var(--content-inset-left);
|
|
margin-right: var(--content-inset-right);
|
|
min-block-size: 0;
|
|
block-size: 50vh;
|
|
border-radius: var(--cpd-space-4x);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.preview > video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
background-color: var(--video-tile-background);
|
|
}
|
|
|
|
video.mirror {
|
|
transform: scaleX(-1);
|
|
}
|
|
|
|
.preview .cameraStarting {
|
|
position: absolute;
|
|
top: var(--cpd-space-10x);
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
color: var(--cpd-color-text-secondary);
|
|
}
|
|
|
|
.avatarContainer {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
background-color: var(--video-tile-background);
|
|
}
|
|
|
|
.buttonBar {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: calc(30 * var(--cpd-space-1x));
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: var(--cpd-space-4x);
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(0, 0, 0, 0) 0%,
|
|
var(--cpd-color-bg-canvas-default) 100%
|
|
);
|
|
}
|
|
|
|
@media (min-aspect-ratio: 1 / 1) {
|
|
.preview > video {
|
|
aspect-ratio: 16 / 9;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 550px) {
|
|
.preview {
|
|
margin-inline: 0;
|
|
border-radius: 0;
|
|
block-size: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
.buttonBar {
|
|
padding-left: var(--content-inset-left);
|
|
padding-right: var(--content-inset-right);
|
|
}
|
|
}
|