who can tell me how to use jsmpeg in vue-cli
npm modules is nonsupport ?
may be you can import it in index.html in you vue project. in index.html, jsmpeg.min.js is in same path with your index.html.
then in your vue file, use it like demo
import './jsmpg'
.....
setTimeout(function() { let client = new WebSocket('ws://127.0.0.1:8084/') let player = new jsmpeg(client, { canvas: document.getElementById('videoCanvas') }) }, 0)
Solved? I also encountered the same problem.
It's a late answer... You can have a try of jsmpeg-player, however it has been deprecated. But I have used npm to install it successfully.
Its usage is very simple. Just import jsmpeg-player in your Vue project.