import { inview } from 'svelte-inview' import previewRice from '$lib/videos/end_4_rice_intro.mp4' import previewRiceThumbnail from '$lib/videos/end_4_thumbnail.png' import AudioIcon from '~icons/mingcute/volume-line' import MuteIcon from '~icons/mingcute/volume-mute-line' import PauseIcon from '~icons/mingcute/pause-circle-line' import clsx from 'clsx' import { onMount } from 'svelte' import { getIsMobile } from '$lib/Helper.mjs' /** @type HTMLVideoElement */ let videoElement let isVisible = false let isShowingControls = false let isMuted = true let isPaused = false $: console.log({ isVisible }) function toggleMute() { isMuted = !isMuted } function togglePlay() { videoElement.paused ? videoElement.play() : videoElement.pause() isPaused = videoElement.paused } function makeFullscreen() { videoElement.requestFullscreen() } onMount(() => { const isMobile = getIsMobile() if (isMobile) { // } })