Add name on screen sharing

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
Gregoire Parant 2022-01-28 19:17:40 +01:00
parent 15be76655f
commit 31b7b5aa08
2 changed files with 10 additions and 4 deletions

View File

@ -30,10 +30,11 @@
{#if $statusStore === "error"}
<div class="rtc-error" />
{/if}
{#if $streamStore === null}
<i style="background-color: {getColorByString(name)};">{name}</i>
{:else}
{#if $streamStore !== null}
<!-- svelte-ignore a11y-media-has-caption -->
<i class="container">
<span style="background-color: {getColorByString(name)};">{name}</span>
</i>
<video
use:srcObject={$streamStore}
autoplay
@ -48,5 +49,10 @@
video {
width: 100%;
}
i {
span {
padding: 2px 32px;
}
}
}
</style>

View File

@ -59,7 +59,7 @@
{/if}
<!-- {#if !$constraintStore || $constraintStore.video === false} -->
<i class="container">
<span style="background-color: {getColorByString(name)};">{peer.userName}</span>
<span style="background-color: {getColorByString(name)};">{name}</span>
</i>
<div class="woka-icon {($constraintStore && $constraintStore.video !== false) || minimized ? '' : 'no-video'}">
<Woka userId={peer.userId} placeholderSrc={""} />