亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Problems with mobile on-demand and live broadcast players?
阿神
阿神 2017-05-24 11:37:17
0
1
709

reason:

公司做課程直播,也就是直播講課,但是只有音頻直播沒有視頻。

need:

在微信端上能自動播放直播流(m3u8),隱藏播放器(因為要看互動聊天信息)。

question:

如果用`<video>`標簽來拉流的話,是可以播放的,基本上都能播放,但是**不能自動播放**,而且**會全屏**
如果用`<audio>`標簽只能兼容部分android版本手機,基本試了市面上的大部分播放器,基本也是這兩個問題:
會全屏,不能自動播放,但是其他公司就能達到我們想要的效果,比如:蜻蜓什么的fm平臺,就想問問有沒有
大神給支個招,怎么解決這個問題???

Current solution:

判斷已知機型來決定用video還是用audio,但這不是解決辦法??!
求指教
阿神
阿神

閉關修行中......

reply all(1)
過去多啦不再A夢

Video seems to be full screen only in WeChat. You need to add an inline element in the video tag to prevent full screen. It seems like this:

<video src="" webkit-playsinline playsinline></video>

As for automatic playback, you need to write a compatibility statement to distinguish between opening in WeChat and opening in a browser. For WeChat, you need to call their jssdk interface. There is no need to fill in the parameters, just add one sentence:

wx.config({
    debug: false,
    appId: '',
    timestamp:1,
    nonceStr: '',
    signature: '',
    jsApiList: []
});

wx.ready(function(){
    video.play();
});

It seems like this should be enough

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template