【问题标题】:Videojs and clappr livestream always open on livestream, how to disable?Videojs和clappr livestream总是在livestream上打开,如何禁用?
【发布时间】:2019-10-31 18:33:18
【问题描述】:

我有一个显示直播视频的页面,但是当我在 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,
        });

希望有人能帮助我,我有点绝望

【问题讨论】:

    标签: javascript ios video.js clappr


    【解决方案1】:

    对于 Video.js,将 playsinline 属性添加到视频元素。

    【讨论】:

      猜你喜欢
      • 2016-09-30
      • 2015-06-04
      • 2016-03-20
      • 2020-01-07
      • 2021-05-16
      • 2022-01-01
      • 1970-01-01
      • 2016-09-13
      • 1970-01-01
      相关资源
      最近更新 更多