feat(web): improvements to slideshow (#8032)

* feat: improvements to slideshow

* feat: pause video with slideshow bar

* pr feedback

* fix: remove dispatch

* fix: simplify

* pr feedback

* pr feedback

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
martin 2024-03-21 21:01:08 +01:00 committed by GitHub
parent 8ed6ed4d2b
commit 508f32c08a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 64 additions and 13 deletions

View file

@ -9,7 +9,9 @@
export let assetId: string;
let element: HTMLVideoElement | undefined = undefined;
let isVideoLoading = true;
const dispatch = createEventDispatcher<{ onVideoEnded: void; onVideoStarted: void }>();
const handleCanPlay = async (event: Event) => {
@ -29,6 +31,7 @@
<div transition:fade={{ duration: 150 }} class="flex h-full select-none place-content-center place-items-center">
<video
bind:this={element}
autoplay
playsinline
controls