Merge branch 'develop' of github.com:thecodingmachine/workadventure
This commit is contained in:
commit
6cea6a3ce0
@ -15,7 +15,7 @@
|
||||
if (stream) {
|
||||
embedScreen = {
|
||||
type: "streamable",
|
||||
embed: stream as unknown as Streamable,
|
||||
embed: peer as unknown as Streamable,
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
@ -31,10 +31,10 @@
|
||||
<div class="rtc-error" />
|
||||
{/if}
|
||||
{#if $streamStore !== null}
|
||||
<!-- svelte-ignore a11y-media-has-caption -->
|
||||
<i class="container">
|
||||
<span style="background-color: {getColorByString(name)};">{name}</span>
|
||||
</i>
|
||||
<!-- svelte-ignore a11y-media-has-caption -->
|
||||
<video
|
||||
use:srcObject={$streamStore}
|
||||
autoplay
|
||||
|
@ -50,7 +50,12 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="video-container" class:no-clikable={!clickable} bind:this={videoContainer}>
|
||||
<div
|
||||
class="video-container"
|
||||
class:no-clikable={!clickable}
|
||||
bind:this={videoContainer}
|
||||
on:click={() => (clickable ? highlightedEmbedScreen.toggleHighlight(embedScreen) : null)}
|
||||
>
|
||||
{#if $statusStore === "connecting"}
|
||||
<div class="connecting-spinner" />
|
||||
{/if}
|
||||
|
@ -2,6 +2,7 @@ import { derived, get, Readable } from "svelte/store";
|
||||
import { ScreenSharingLocalMedia, screenSharingLocalMedia } from "./ScreenSharingStore";
|
||||
import { peerStore, screenSharingStreamStore } from "./PeerStore";
|
||||
import type { RemotePeer } from "../WebRtc/SimplePeer";
|
||||
import { highlightedEmbedScreen } from "./EmbedScreensStore";
|
||||
|
||||
export type Streamable = RemotePeer | ScreenSharingLocalMedia;
|
||||
|
||||
@ -25,6 +26,12 @@ function createStreamableCollectionStore(): Readable<Map<string, Streamable>> {
|
||||
addPeer($screenSharingLocalMedia);
|
||||
}
|
||||
|
||||
const $highlightedEmbedScreen = get(highlightedEmbedScreen);
|
||||
|
||||
if ($highlightedEmbedScreen?.type === "streamable" && !peers.has($highlightedEmbedScreen.embed.uniqueId)) {
|
||||
highlightedEmbedScreen.removeHighlight();
|
||||
}
|
||||
|
||||
set(peers);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user