svelte-video-player icon indicating copy to clipboard operation
svelte-video-player copied to clipboard

No fullscreen control available

Open vaib95 opened this issue 3 years ago • 2 comments

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? Screenshot 2021-08-14 at 6 13 17 PM

vaib95 avatar Aug 14 '21 12:08 vaib95

I guess that you were in npm run dev mode, you need to npm run build it to run in browser.

metayii avatar Nov 30 '21 20:11 metayii

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.

sateeshsai avatar Jan 04 '23 15:01 sateeshsai