* make tiles based on rtc member * display missing lk participant + fix tile multiplier * add show_non_member_participants config option * per member tiles * merge fixes * linter * linter and tests * tests * adapt tests (wip) * Remove unused keys * Fix optionality of nonMemberItemCount * video is optional * Mock RTC members * Lint * Merge fixes * Fix user id * Add explicit types for public fields * isRTCParticipantAvailable => isLiveKitParticipantAvailable * isLiveKitParticipantAvailable * Readonly * More keys removal * Make local field based on view model class not observable * Wording * Fix RTC members in tes * Tests again * Lint * Disable showing non-member tiles by default * Duplicate screen sharing tiles like we used to * Lint * Revert function reordering * Remove throttleTime from bad merge * Cleanup * Tidy config of show non-member settings * tidy up handling of local rtc member in tests * tidy up test init * Fix mocks * Cleanup * Apply local override where participant not yet known * Handle no visible media id * Assertions for one-on-one view * Remove isLiveKitParticipantAvailable and show via encryption status * Handle no local media (yet) * Remove unused effect for setting * Tidy settings * Avoid case of one-to-one layout with missing local or remote * Iterate * Remove option to show non-member tiles to simplify code review * Remove unused code * Remove more remnants of show-non-member-tiles * iterate * back * Fix unit test * Refactor * Expose TestScheduler as global * Fix incorrect type assertion * Simplify speaking observer * Fix * Whitespace * Make it clear that we are mocking MatrixRTC memberships * Test case for only showing tiles for MatrixRTC session members * Simplify diff * Simplify diff These changes are in https://github.com/element-hq/element-call/pull/2809 * . * Whitespaces * Use asObservable when exposing subject * Show "waiting for media..." when no participant * Additional test case * Don't show "waiting for media..." in case of local participant * Make the loading state more subtle - instead of a label we show a animated gradient * Use correct key for matrix rtc foci in code comment. (#2838) * Update src/tile/SpotlightTile.tsx Co-authored-by: Timo <16718859+toger5@users.noreply.github.com> * Update src/state/CallViewModel.ts Co-authored-by: Timo <16718859+toger5@users.noreply.github.com> * Make the purpose of BaseMediaViewModel.local explicit * Use named object instead of unnamed array for spotlightAndPip * Refactor spotlightAndPip into spotlight and pip * Use if statement instead of ternary for readability in spotlight and pip logic * Review feedback * Fix tests for CallEventAudioRenderer * Lint * Revert "Make the loading state more subtle" This reverts commit 765f7b4f319b86839fcb4fde28d1e0604e542577. * Update src/state/CallViewModel.ts Co-authored-by: Timo <16718859+toger5@users.noreply.github.com> * Fix spelling * Remove a non-null assertion that failed at runtime --------- Co-authored-by: Hugh Nimmo-Smith <hughns@element.io> Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
189 lines
4.1 KiB
CSS
189 lines
4.1 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.
|
|
*/
|
|
|
|
.media {
|
|
container-name: mediaView;
|
|
container-type: size;
|
|
border-radius: var(--media-view-border-radius);
|
|
}
|
|
|
|
.media video {
|
|
inline-size: 100%;
|
|
block-size: 100%;
|
|
object-fit: contain;
|
|
background-color: var(--video-tile-background);
|
|
/* This transform is a no-op, but it forces Firefox to use a different
|
|
rendering path, one that actually clips the corners of <video> elements into
|
|
the intended rounded shape. We can remove this if Firefox stops being broken. */
|
|
transform: translate(0);
|
|
}
|
|
|
|
.media.mirror video {
|
|
transform: scaleX(-1);
|
|
}
|
|
|
|
.media[data-video-fit="cover"] video {
|
|
object-fit: cover;
|
|
}
|
|
|
|
.media[data-video-fit="contain"] video {
|
|
object-fit: contain;
|
|
}
|
|
|
|
.bg {
|
|
background-color: var(--video-tile-background);
|
|
inline-size: 100%;
|
|
block-size: 100%;
|
|
border-radius: inherit;
|
|
contain: strict;
|
|
}
|
|
|
|
.avatar {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* CSS makes us put a condition here, even though all we want to do is
|
|
unconditionally select the container so we can use cqmin units */
|
|
@container mediaView (width > 0) {
|
|
.avatar {
|
|
/* Half of the smallest dimension of the tile */
|
|
inline-size: 50cqmin;
|
|
block-size: 50cqmin;
|
|
}
|
|
}
|
|
|
|
.avatar > img {
|
|
/* To make avatars scale smoothly with their tiles during animations, we
|
|
override the styles set on the element */
|
|
inline-size: 100% !important;
|
|
block-size: 100% !important;
|
|
}
|
|
|
|
.fg {
|
|
position: absolute;
|
|
inset: var(
|
|
--media-view-fg-inset,
|
|
calc(var(--media-view-border-radius) - var(--cpd-space-3x))
|
|
);
|
|
display: grid;
|
|
grid-template-columns: 30px 1fr 30px;
|
|
grid-template-rows: 1fr auto;
|
|
grid-template-areas: "reactions status ." "nameTag nameTag button";
|
|
gap: var(--cpd-space-1x);
|
|
place-items: start;
|
|
}
|
|
|
|
.nameTag {
|
|
grid-area: nameTag;
|
|
padding: var(--cpd-space-1x);
|
|
padding-block: var(--cpd-space-1x);
|
|
color: var(--cpd-color-text-primary);
|
|
background-color: var(--cpd-color-bg-canvas-default);
|
|
display: flex;
|
|
align-items: center;
|
|
border-radius: var(--cpd-radius-pill-effect);
|
|
user-select: none;
|
|
overflow: hidden;
|
|
box-shadow: var(--small-drop-shadow);
|
|
box-sizing: border-box;
|
|
max-inline-size: 100%;
|
|
}
|
|
|
|
.status {
|
|
grid-area: status;
|
|
justify-self: center;
|
|
align-self: start;
|
|
padding: var(--cpd-space-2x);
|
|
padding-block: var(--cpd-space-2x);
|
|
color: var(--cpd-color-text-primary);
|
|
background-color: var(--cpd-color-bg-canvas-default);
|
|
display: flex;
|
|
align-items: center;
|
|
border-radius: var(--cpd-radius-pill-effect);
|
|
user-select: none;
|
|
overflow: hidden;
|
|
box-shadow: var(--small-drop-shadow);
|
|
box-sizing: border-box;
|
|
max-inline-size: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.reactions {
|
|
grid-area: reactions;
|
|
display: flex;
|
|
gap: var(--cpd-space-1x);
|
|
}
|
|
|
|
.nameTag > svg,
|
|
.nameTag > span {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nameTag > .name {
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
padding-inline: var(--cpd-space-2x);
|
|
flex-shrink: 1;
|
|
}
|
|
|
|
.errorIcon {
|
|
display: block;
|
|
color: var(--cpd-color-icon-critical-primary);
|
|
}
|
|
|
|
.fg > button {
|
|
appearance: none;
|
|
border: none;
|
|
border-radius: var(--cpd-radius-pill-effect);
|
|
padding: var(--cpd-space-1x);
|
|
background: var(--cpd-color-bg-action-primary-rest);
|
|
box-shadow: var(--small-drop-shadow);
|
|
cursor: pointer;
|
|
opacity: 0;
|
|
transition:
|
|
opacity 0.15s,
|
|
background-color 0.1s;
|
|
}
|
|
|
|
.fg:has(:focus-visible) > button,
|
|
.fg > button[data-enabled="true"],
|
|
.fg > button[data-state="open"] {
|
|
opacity: 1;
|
|
}
|
|
|
|
@media (hover) {
|
|
.fg:hover > button {
|
|
opacity: 1;
|
|
}
|
|
|
|
.fg > button:hover {
|
|
background: var(--cpd-color-bg-action-primary-hovered);
|
|
}
|
|
}
|
|
|
|
.fg > button:active {
|
|
background: var(--cpd-color-bg-action-primary-pressed) !important;
|
|
}
|
|
|
|
.fg > button[data-state="open"] {
|
|
background: var(--cpd-color-bg-action-primary-pressed);
|
|
}
|
|
|
|
.fg > button > svg {
|
|
display: block;
|
|
color: var(--cpd-color-icon-on-solid-primary);
|
|
}
|
|
|
|
.fg > button:first-of-type {
|
|
grid-area: button;
|
|
}
|