pluginSlice fix fullscreen btn with sliding

This commit is contained in:
VDawg 2023-11-14 15:45:17 +01:00
parent 8b291f8821
commit 07417aca1f
2 changed files with 20 additions and 18 deletions

View file

@ -3,7 +3,6 @@
import PlayIcon from '~icons/mingcute/play-circle-line'
import { inview } from 'svelte-inview'
import IconFullscreen from '~icons/mingcute/fullscreen-fill'
import { onMount } from 'svelte'
/** @type {string} */
export let src
@ -55,8 +54,6 @@
on:pause={() => (isPaused = true)}
{autoplay}
on:play={() => (isPaused = false)}
on:mouseenter
on:mouseleave
/>
<button on:click={makeFullscreen} class="absolute bottom-2 left-2 z-10">

View file

@ -118,21 +118,26 @@
isHoveringVideo && '-translate-x-56'
)}
>
{#each items as { src, poster }, index}
<Video
{src}
{poster}
autoplay
bind:videoElement={videos[index]}
class="z-10 aspect-video h-[inherit] origin-left rounded-lg object-cover object-left shadow-xl shadow-cyan-700/50 outline outline-2 outline-cyan-500 duration-500"
hidden={index !== activeIndex}
on:pause={pauseVideos}
on:play={playVideos}
videoClass="h-[inherit] aspect-video"
on:mouseenter={slideVideoIn}
on:mouseleave={slideVideoOut}
/>
{/each}
<div
class="h-full w-full"
on:mouseenter={slideVideoIn}
on:mouseleave={slideVideoOut}
role="complementary"
>
{#each items as { src, poster }, index}
<Video
{src}
{poster}
autoplay
bind:videoElement={videos[index]}
class="z-10 aspect-video h-[inherit] origin-left rounded-lg object-cover object-left shadow-xl shadow-cyan-700/50 outline outline-2 outline-cyan-500 duration-500"
hidden={index !== activeIndex}
on:pause={pauseVideos}
on:play={playVideos}
videoClass="h-[inherit] aspect-video"
/>
{/each}
</div>
<div
class="pt-5 text-sm font-medium text-slate-300 md:text-base [&>a:hover]:text-cyan-300 [&>a:hover]:underline [&>a]:font-bold"
>