vue-videojs-async
use videojs through vue async component, so you can load video.js and video.css when you really need it.
github
https://github.com/yinzhida/vue-videojs-async for more details
install
npm install --save vue-videojs-async
use
// main.js Vue
// vue template
you can change src through change props, you can see a demo in test folder
{ thissrc = 'https://cdn.theguardian.tv/HLS/2015/07/20/150716YesMen.m3u8' thistype = 'video/m3u8'}
change videojs source file path(cdn or your private source path)
the default path of videojs source file is '//vjs.zencdn.net/7.3.0/video.min.js' and '//vjs.zencdn.net/7.3.0/video-js.min.css' you can change the path(url) of videojs source file like this:
// ...
the default compName is 'vue-custom-videojs' you can overwrite it by give the forth parameter. asyncVideojsCompFactory will register a new async vue component, the new component named compName will load your custom videojs source files. then you can use your custom component like this:
// vue template
TODO
add plugins...