videojs-markers
videojs-markers copied to clipboard
How can I use this plugin with vuejs?
I am trying to use this plugin with vuejs (more precisely, my vuejs code is based on the vuejs-cli template). So after I installed the source code of videojs-markers through "npm install videojs-markers --save", I tried to import both the css and js files of videojs-markers:
import "videojs-markers/dist/videojs.markers.css"; import "videojs-markers/dist/videojs-markers.js";
But it does not work. So is there anybody who have the same issue with me? What should I do? Thanks.
I suggest using surmon-china/vue-video-player. If you don't want to, videojs-markers will self-register itself as a plugin to video.js. Just make sure you're importing those 2 dist files before you initialize your app. Import video.js first, then this plugin, then create your new Vue()
app.