What is this?

A small React component rendering a video with object-fit: cover, or a fallback if object-fit is not available. This is not a polyfill, it just creates a similar effect and it only works for videos.

Why?

There are existing object-fit polyfills:You should check them out. In comparison this component gives you a lot of control and probably works better in the context of a React application.

How does it work?

You should have a look at the readme and the examples. I also encourage you to have a look at the code, it should be relatively easy to understand.
If you have any questions or spot an error I would be glad to help.