Merge branch 'develop' of github.com:thecodingmachine/workadventure into MenuSvelte
This commit is contained in:
commit
e86892b9a5
18 changed files with 98 additions and 9 deletions
|
@ -7,6 +7,8 @@
|
|||
import {videoFocusStore} from "../../Stores/VideoFocusStore";
|
||||
import {showReportScreenStore} from "../../Stores/ShowReportScreenStore";
|
||||
import {getColorByString, srcObject} from "./utils";
|
||||
import {obtainedMediaConstraintIsMobileStore} from "../../Stores/MediaStore";
|
||||
import {onDestroy} from "svelte";
|
||||
|
||||
export let peer: VideoPeer;
|
||||
let streamStore = peer.streamStore;
|
||||
|
@ -18,6 +20,13 @@
|
|||
showReportScreenStore.set({ userId:peer.userId, userName: peer.userName });
|
||||
}
|
||||
|
||||
let isMobile : boolean|null;
|
||||
const unsubscribe = obtainedMediaConstraintIsMobileStore.subscribe(value => {
|
||||
console.log('unsubscribe => obtainedMediaConstraintIsMobileStore', value);
|
||||
isMobile = value;
|
||||
});
|
||||
onDestroy(unsubscribe);
|
||||
|
||||
</script>
|
||||
|
||||
<div class="video-container">
|
||||
|
@ -31,13 +40,13 @@
|
|||
<i style="background-color: {getColorByString(name)};">{name}</i>
|
||||
{/if}
|
||||
{#if $constraintStore && $constraintStore.audio === false}
|
||||
<img src={microphoneCloseImg} alt="Muted">
|
||||
<img src={microphoneCloseImg} class="active" alt="Muted">
|
||||
{/if}
|
||||
<button class="report" on:click={() => openReport(peer)}>
|
||||
<img alt="Report this user" src={reportImg}>
|
||||
<span>Report/Block</span>
|
||||
</button>
|
||||
<video use:srcObject={$streamStore} autoplay playsinline on:click={() => videoFocusStore.toggleFocus(peer)}></video>
|
||||
<video class:mobile="{isMobile === true}" use:srcObject={$streamStore} autoplay playsinline on:click={() => videoFocusStore.toggleFocus(peer)}></video>
|
||||
<img src={blockSignImg} class="block-logo" alt="Block" />
|
||||
{#if $constraintStore && $constraintStore.audio !== false}
|
||||
<SoundMeterWidget stream={$streamStore}></SoundMeterWidget>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue