Open volkanciloglu opened 6 years ago
@VCodepp Which version of Vue-APlayer are you using?
I see package-lock.json
"version": "1.6.0",
I did not add project hls.js. sorry is my mistake completely.
I tried $ npm install --save hls.js
and dismiss warn problem.
@VCodepp Nah actually there's still problem with Vue-APlayer. hls.js
is not a solid dependency of Vue-APlayer. It's only required if you want to play HLS media. And if you don't, everything still works fine without hls.js
- silently without warning. So I still need to figure it out.
Related line: https://github.com/SevenOutman/vue-aplayer/blob/develop/src/vue-aplayer.vue#L723
@VCodepp A quick fix to this is adding hls.js
to "externals"
in your webpack config, like
{
externals: 'hls.js'
}
????:{
externals: 'hls.js'
}
sorry learning new VUE
@VCodepp If you're using vue-cli
, the webpack config file is in build/webpack.base.conf.js
. Add an 'external'
property to the exported object like:
module.exports = {
entry: ...,
output: ...,
+ externals: 'hls.js'
}
Ok thank for help .
+1, Same problem.
如果用externals把‘hls.js’去除,npm run dev下会报hls is not defined的错误。
I installed the aplayer with the npm install method. all the settings are working ok so everything is working. but the console gives a warning and it's about hls.js. how can i solve it?