fix progressbar in post page

This commit is contained in:
MuslemRahimi 2024-05-26 21:32:28 +02:00
parent 7835fe05d3
commit d0285b033e
2 changed files with 6 additions and 7 deletions

View File

@ -3,11 +3,12 @@
import { onMount, onDestroy} from 'svelte'; import { onMount, onDestroy} from 'svelte';
import { browser } from '$app/environment'; import { browser } from '$app/environment';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import { screenWidth } from '$lib/store';
let id = uuidv4(); let id = uuidv4();
export let src; export let src;
export let hideProgressbar = false;
let container; let container;
@ -138,6 +139,7 @@ function toggleMute(event) {
{/if} {/if}
</div> </div>
{#if !hideProgressbar}
<progress class="progress [&::-webkit-progress-value]:bg-[#FF0000] [&::-moz-progress-bar]:bg-[#FF0000] w-full bg-white" value={progress} max="100" style="height: 1.5px"></progress> <progress class="progress [&::-webkit-progress-value]:bg-[#FF0000] [&::-moz-progress-bar]:bg-[#FF0000] w-full bg-white" value={progress} max="100" style="height: 1.5px"></progress>
{/if}

View File

@ -621,10 +621,7 @@ $: {
</h1> </h1>
{#if videoId === null} {#if videoId === null}
@ -679,7 +676,7 @@ $: {
/> />
--> -->
<div class="relative m-auto {$screenWidth < 640 ? 'w-screen' : 'w-fit max-w-[800px] max-h-[700px]'}"> <div class="relative m-auto {$screenWidth < 640 ? 'w-screen' : 'w-fit max-w-[800px] max-h-[700px]'}">
<VideoPlayer src={getImageURL(post?.collectionId, post?.id, post?.thumbnail)} /> <VideoPlayer src={getImageURL(post?.collectionId, post?.id, post?.thumbnail)} hideProgressbar = {$screenWidth > 640 ? true : false} />
</div> </div>
</label> </label>