Video-fit Polyfill
An object-fit polyfill for videos.
Installation
npm install @firstandthird/video-fit-polyfill
Usage
For magic:
- Import it
- Use fit-video as class in all the videos you want.
- Magic
If you prefer to use your own selector, import the function and use it as it's shown below.
videoFitPolyfill('.my-custom-selector')
If the browser supports object-fit it won't do anything.