Fix streamable display after left a group

This commit is contained in:
Nolway 2022-01-31 11:41:30 +01:00
parent 4400c79b93
commit 50b752a205
2 changed files with 7 additions and 2 deletions

View file

@ -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);
}
);

View file

@ -38,8 +38,6 @@ body .message-info.warning{
.video-container {
display: flex;
transition: all 0.2s ease;
background-color: #00000099;
border-radius: 15px;
cursor: url('./images/cursor_pointer.png'), pointer;
width: 100%;