tkloht / react-video-cover

A small React component rendering a <video/> with object-fit: cover, or a Fallback if object-fit is not available.
http://tkloht.github.io/react-video-cover
MIT License
58 stars 14 forks source link

Allow server side rendering #176

Closed JonnyBurger closed 6 years ago

JonnyBurger commented 6 years ago

Adds a check if 'window' exists to allow SSR.

tkloht commented 6 years ago

I totally missed this, thanks for the PR! Looks good, i'll merge later today.

romanown commented 5 years ago

it's probably not due to server-side rendering. I started to use the module 22.06.2018. while I ran into the described error, which is eliminated in this way.