Mar 14, 2018
0
Level 2
VideoJS and videojs-contrib-hls
I'm using these two together already to stream HLS content. At the moment, but including source links on my page to the respective CDNs
I want to move these components and soon other VideoJS components into my app.js file.
Having loaded these two components in using npm, I'm now including the following in my bootstrap.js
window.videojs = require('video.js');
window.videojsContribHls = require('videojs-contrib-hls');
Doing this seems to make video.js available on my page, but videojs-contrib-hls is not. I'm getting an error: Uncaught SyntaxError: Unexpected identifier
From doing some research, I can see there's an extra step I need to complete, some clues at https://docs.videojs.com/tutorial-webpack.html , I just cannot figure out how to implement that in a laravel environment.
Please or to participate in this conversation.