我有一个显示实时流视频的页面,但是当我在ios设备上打开该页面时,它会以全屏模式打开实时流,而当全屏模式退出时,活动流会暂停。我想要的实时视频流播放,而不打开它在全屏模式。
在video.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,
});希望有人能帮我,我有点绝望
发布于 2019-11-03 09:37:09
对于Video.js,将playsinline属性添加到视频元素中。
https://stackoverflow.com/questions/58649405
复制相似问题