Closed shuilingw closed 3 years ago
我是win10的系统
现在前面几步都没问题了,卡在了这里
npm run build 安装完了,请问怎么用下面这个
<script src="mpegts.js"></script>
<video id="videoElement"></video>
<script>
if (mpegts.getFeatureList().mseLivePlayback) {
var videoElement = document.getElementById('videoElement');
var player = mpegts.createPlayer({
type: 'mse', // could also be mpegts, m2ts, flv
isLive: true,
url: 'http://example.com/live/livestream.ts'
});
player.attachMediaElement(videoElement);
player.load();
player.play();
}
</script>
比如我想看下面这个直播源应该怎么操作
https://aldirect.hls.huya.com/huyalive/1448118938-1448118938-6219623479428251648-100209664-10057-A-0-1.m3u8?wsSecret=270476d335859b671c5d04f439b5cfc5&wsTime=60b743da&u=0&seqid=16225367929936164&fm=RFdxOEJjSjNoNkRKdDZUWV8kMF8kMV8kMl8kMw%3D%3D&ctype=tars_mobile&txyp=o%3Anc2%3B&fs=bgct&t=103'
我安装了node.js后,mpegts.js-master文件夹放在桌面,用cmd输入以下指令: npm install --save mpegts.js,出现 npm install ,出现 npm install -g webpack-cli ,出现 npm run build,出现 这个安装顺序有问题吗?还有想问一下
Getting Started