jsmpeg icon indicating copy to clipboard operation
jsmpeg copied to clipboard

who can tell me how to use jsmpeg in vue-cli

Open Ssanmifoguang opened this issue 8 years ago • 5 comments

Ssanmifoguang avatar Jan 11 '18 03:01 Ssanmifoguang

npm modules is nonsupport ?

chengenhuai avatar Jan 09 '19 03:01 chengenhuai

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

wfeidan avatar Jun 16 '19 07:06 wfeidan

import './jsmpg'

.....

setTimeout(function() { let client = new WebSocket('ws://127.0.0.1:8084/') let player = new jsmpeg(client, { canvas: document.getElementById('videoCanvas') }) }, 0)

githubchange avatar Aug 09 '19 02:08 githubchange

Solved? I also encountered the same problem.

FEJackFly avatar Sep 09 '19 09:09 FEJackFly

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.

hungtseyee avatar Mar 11 '20 08:03 hungtseyee