fix: adjust cam preview

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2025-05-06 12:25:05 +07:00
parent 84f0c07d5c
commit 3f0a2f214a
No known key found for this signature in database
GPG Key ID: 3320C3B3324E934C
2 changed files with 17 additions and 17 deletions

View File

@ -64,12 +64,24 @@
} }
</script> </script>
{#if stream !== null} <div class="container">
<!-- svelte-ignore a11y-media-has-caption --> {#if stream !== null}
<video bind:this={video} width="100%" height="100%" autoplay muted disablepictureinpicture /> <!-- svelte-ignore a11y-media-has-caption -->
{/if} <video bind:this={video} width="100%" height="100%" autoplay muted disablepictureinpicture />
{/if}
</div>
<style lang="scss"> <style lang="scss">
.container {
padding: 0.375rem;
border-radius: 0.375rem;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
video { video {
border-radius: inherit; border-radius: inherit;
transform: rotateY(180deg); transform: rotateY(180deg);

View File

@ -101,9 +101,7 @@
{/each} {/each}
{#if selected} {#if selected}
<div class="preview"> <MediaPopupCamPreview {selected} />
<MediaPopupCamPreview {selected} />
</div>
{/if} {/if}
{:else} {:else}
<MediaPopupItem <MediaPopupItem
@ -126,14 +124,4 @@
color: var(--theme-state-positive-color); color: var(--theme-state-positive-color);
} }
} }
.preview {
padding: 0.375rem;
border-radius: 0.375rem;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>