react-jw-player icon indicating copy to clipboard operation
react-jw-player copied to clipboard

Video player not resizing.

Open JacobMJones opened this issue 6 years ago • 10 comments

I read https://github.com/micnews/react-jw-player/issues/91 and tried to use a default player but I still can't seem to resize the video player after the initial page load. I am trying to keep it full screen the whole time. Ive also tried setting the height and width to 100vh and 100vw width respectively

https://hastebin.com/yarutafuvi.cpp

here is the site: www.phyxable.com

JacobMJones avatar Nov 22 '18 15:11 JacobMJones

@JacobMJones do you have a live demo of this code running on the site? I didn't see it anywhere. If you can get your use case up and running I can take a look at it.

danmakenoise avatar Nov 22 '18 16:11 danmakenoise

@danmakenoise thanks, sorry I uploaded the production version. Here is one with the code https://5bf6ee9fc6aed67bfea8be0e--phyxable.netlify.com

Have you outlined anywhere how to maintain a fullscreen on resize? Is that a prop or anything like that?

thanks for your time I appreciate it

JacobMJones avatar Nov 22 '18 18:11 JacobMJones

@JacobMJones sorry just getting around to looking into this! It looks like the demo is working as intended for you, did you fix it yourself?

danmakenoise avatar Nov 27 '18 13:11 danmakenoise

@danmakenoise If you load the page with a smaller window and then resize it larger you will see that the video player is not resizing.

JacobMJones avatar Nov 27 '18 14:11 JacobMJones

Hi @JacobMJones for your issue try using vh and vw instead of px like (width: 100vw ,height: 100vh), hope it will solve the problem !

aymanokas avatar Nov 28 '18 09:11 aymanokas

Sadly I have tried that, nothing I do seems to get it to rerender.

JacobMJones avatar Nov 28 '18 13:11 JacobMJones

I tried video-react and had the same issue. I tried https://github.com/tkloht/react-video-cover and it totally resizes properly but the autoplay doesn't seem to work on reload of the page

JacobMJones avatar Nov 29 '18 17:11 JacobMJones

For me it works fine when I wrap the videoPlayer before using it.

aymanokas avatar Nov 30 '18 10:11 aymanokas

@JacobMJones do you have the player set up per this guide: https://support.jwplayer.com/articles/how-to-setup-a-responsive-player

danmakenoise avatar Dec 01 '18 18:12 danmakenoise

@danmakenoise thanks for all your help, ive decided to just use the video tag for now and it seems to work. I never figured out why I couldn't get this library or video-react to rerender on resize.

JacobMJones avatar Dec 05 '18 13:12 JacobMJones