svelte-video-player
svelte-video-player copied to clipboard
No fullscreen control available
Hi, I am using this component svelte-kit. (new to the whole thing)
Whenever I try to import this component, I get ReferenceError : window is not defined which mostly comes from screenfull.js
Post that I tried to import the component dynamically (as shown below) ,
onMount(async () =>{
VideoPlayer = (await import('svelte-video-player')).default;
})
now the component is renderinh successfully but the full screen control still doesn't show up, I also tried below but this didn't work either.
onMount(async () =>{
if(typeof window !== 'undefined' && typeof window.document !== 'undefined' ){
VideoPlayer = (await import('svelte-video-player')).default;
}
})
Not sure what exactly is the issue. Can you help?
I guess that you were in npm run dev mode, you need to npm run build it to run in browser.
I'm facing the same issue. The full screen control won't show even when i try with the exact set of props from the demo/examples page.