Files
element-call/src/room/VideoPreview.module.css

75 lines
1.3 KiB
CSS
Raw Normal View History

2023-01-03 16:58:38 +00:00
/*
Copyright 2022-2024 New Vector Ltd.
2023-01-03 16:58:38 +00:00
SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
2023-01-03 16:58:38 +00:00
*/
2022-04-27 15:18:55 -07:00
.preview {
2023-09-18 15:45:48 -04:00
margin-inline: var(--inline-content-inset);
min-block-size: 0;
block-size: 50vh;
border-radius: var(--cpd-space-4x);
2022-04-27 15:18:55 -07:00
position: relative;
overflow: hidden;
}
.preview > video {
width: 100%;
2022-04-27 15:18:55 -07:00
height: 100%;
2023-09-18 15:45:48 -04:00
object-fit: cover;
background-color: var(--video-tile-background);
2022-04-27 15:18:55 -07:00
}
video.mirror {
transform: scaleX(-1);
}
2022-04-27 15:18:55 -07:00
.avatarContainer {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
2022-04-27 15:18:55 -07:00
display: flex;
justify-content: center;
align-items: center;
background-color: var(--video-tile-background);
2022-04-27 15:18:55 -07:00
}
2023-09-18 15:45:48 -04:00
.buttonBar {
2022-04-27 15:18:55 -07:00
position: absolute;
bottom: 0;
left: 0;
right: 0;
2023-09-18 15:45:48 -04:00
height: calc(30 * var(--cpd-space-1x));
2022-04-27 15:18:55 -07:00
display: flex;
justify-content: center;
align-items: center;
2023-09-18 15:45:48 -04:00
gap: var(--cpd-space-4x);
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
var(--cpd-color-bg-canvas-default) 100%
);
2022-04-27 15:18:55 -07:00
}
2023-09-18 15:45:48 -04:00
@media (min-aspect-ratio: 1 / 1) {
.preview > video {
2023-09-18 15:45:48 -04:00
aspect-ratio: 16 / 9;
2022-04-27 15:18:55 -07:00
}
}
@media (max-width: 550px) {
.preview {
margin-inline: 0;
border-radius: 0;
block-size: 100%;
width: 100%;
}
.buttonBar {
padding-inline: var(--inline-content-inset);
}
}