videojs-vimeo
videojs-vimeo copied to clipboard
Getting master branch to work with webpack
For anyone else wondering how to get the master branch working with a webpack configuration, it is best to avoid trying to use the dist files.
First, install the master branch so you can enjoy the new Vimeo player:
$ yarn add videojs/videojs-vimeo#master
You'll likely hit a Can't resolve 'videojs-vimeo' error with webpack at this point. To resolve import from the src folder:
import videojs from 'video.js'
import 'videojs-vimeo/src/Vimeo'
Using current master also will avoid any TypeError: Cannot read property 'vdata1478551913479' errors if you dispose() the player, which is a bit of a problem in version 2.0.2.
Please note that I am using version 5.20.4 of video.js. I found that the plugins I want to use with the player are not all ready for version 6.x.x.