Closed adsl99801 closed 5 years ago
Hi @adsl99801 ,
Yes, you are right it does not work as it suposed to work in projects managed by angular cli. I'll investigate further.
In the meantime, a solution would be to include videojs as a global script as well.
Try something like this in your angular.json:
...
"scripts": [
"node_modules/video.js/dist/video.js",
"node_modules/videojs-offset/dist/videojs-offset.js"
]
...
Also remove any import videojs from "video.js"
in you modules/components and start using videojs as global. For example use window['videojs']
.
Does it make sense for you?
I'm closing this issue due to inactivity.
I want to use this plugin in angular7 but something go wrong. angular.json import videojs from 'video.js'; this.player = videojs('nowVideo');
Uncaught TypeError: Cannot read property 'registerPlugin' of undefined at videojs-offset.js:19
How to fix?