与
视频.js
我就是这么想的:
html格式:
<video id="hls-player" controls autoPlay preload="auto" className='video-js vjs-default-skin vjs-big-play-centered'>
<source src="http://localhost:8080/hls/cam06.m3u8" />
</video>
js公司:
videojs('hls-player', {
controls: true,
liveui:true,
allowfullscreen:false,
autoplay: true,
});
而且,我试着用
Clappr库
但是得到了同样的结果,这是我所做的:
*html格式:
<div id="player" align='center'>
</div>
js公司:*
new Clappr.Player({
// this is an example url - for this to work you'll need to generate fresh token
source: 'http://localhost:8080/hls/cam06.m3u8',
parentId: '#player',
autoPlay:true,
});