fix progressbar in post page
This commit is contained in:
parent
7835fe05d3
commit
d0285b033e
@ -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}
|
||||||
|
|
||||||
|
|||||||
@ -623,9 +623,6 @@ $: {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{#if videoId === null}
|
{#if videoId === null}
|
||||||
|
|
||||||
{#if post?.postType === 'link'}
|
{#if post?.postType === 'link'}
|
||||||
@ -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>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user