Files
element-call-Github/src/room/VideoPreview.module.css
Hugh Nimmo-Smith ba5da7e9af Inform user that their camera is starting in Lobby (#2869)
* Inform user that their camera is starting

Instead of just showing a grey box.

* Review feedback

* Show spinner from design suggestion

* useMemo

* Lint

* Lint

* Feedback from review

* Use colour that actually exists

* Refactor into Avatar superclass

* .

* Remove size limit behaviour

* Add VideoPreview tests
2024-12-18 15:31:45 +00:00

86 lines
1.5 KiB
CSS

/*
Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
*/
.preview {
margin-inline: var(--inline-content-inset);
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-inline: var(--inline-content-inset);
}
}