FIX: the video element should not have a bigger height than its container

This commit is contained in:
Kharhamel 2021-09-09 16:51:02 +02:00
parent c07d853588
commit d071f5fa90
4 changed files with 6 additions and 16 deletions

View file

@ -7,8 +7,6 @@
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;
@ -20,12 +18,6 @@
showReportScreenStore.set({ userId:peer.userId, userName: peer.userName });
}
let isMobile : boolean|null;
const unsubscribe = obtainedMediaConstraintIsMobileStore.subscribe(value => {
isMobile = value;
});
onDestroy(unsubscribe);
</script>
<div class="video-container">
@ -45,7 +37,7 @@
<img alt="Report this user" src={reportImg}>
<span>Report/Block</span>
</button>
<video class:mobile="{isMobile === true}" use:srcObject={$streamStore} autoplay playsinline on:click={() => videoFocusStore.toggleFocus(peer)}></video>
<video 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>