Clean up code and add case for single screen
This commit is contained in:
parent
f8412939c7
commit
8c39f7e5d0
1 changed files with 7 additions and 3 deletions
|
@ -8,10 +8,14 @@
|
|||
|
||||
onMount(() => {
|
||||
streams = new URLSearchParams(window.location.search).getAll("streams");
|
||||
console.log(streams.length);
|
||||
fracsX = Math.max(Math.ceil(streams.length / 2), 2);
|
||||
fracsY = Math.max(Math.ceil(streams.length / 2), 2);
|
||||
if (streams.length === 2) {
|
||||
|
||||
if (streams.length === 1) {
|
||||
fracsY = 1;
|
||||
fracsX = 1;
|
||||
} else if (streams.length === 2) {
|
||||
fracsY = Math.max(Math.ceil(streams.length / 2), 2);
|
||||
fracsX = 1;
|
||||
} else {
|
||||
fracsX = Math.max(Math.ceil(streams.length / 2), 2);
|
||||
|
@ -34,7 +38,7 @@
|
|||
}
|
||||
}}>Fullscreen</button
|
||||
>
|
||||
<button>Placeholder</button>
|
||||
<!--<button>Placeholder</button>-->
|
||||
{/if}
|
||||
</div>
|
||||
<div
|
||||
|
|
Loading…
Reference in a new issue