Commit 90587cd2 by libai

测试

parent f5c34097
......@@ -567,6 +567,7 @@
<!-- <script src="../lib/inobounce.js"></script> -->
<!-- <script src="lib/fingerprint2.js"></script> -->
<script src="../lib/login.js?v=2022111801"></script>
<script src="../lib/flv.js"></script>
<script>
$(function(){
var dHeight=$(document).height()
......@@ -582,7 +583,6 @@ $(function(){
$(".room-content-loading").css("height",dHeight+'px')
// hotList()
liveList(1)
//进入直播间
$.ajax({
url:$ip+'room/enterRoom',
......@@ -696,7 +696,7 @@ $(function(){
$(".sound-btn").attr("src","images/sound-yes.png")
$(".gift-btn").attr("src","images/gift-btn.png")
$(".video-box video").prop("muted",false)
html+='<video id="myVideo" autoplay webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="height:100%;object-fit:fill;position:absolute;z-index: 10" poster="" src="'+data.pullFlowUrlHLS+'"></video>'
html+='<video id="myVideo" autoplay webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="height:100%;object-fit:fill;position:absolute;z-index: 10" poster="" src=""></video>'
}else{
html+='<video muted id="myVideo" autoplay webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="height:100%;object-fit:fill;position:absolute;z-index: 10" poster="" src="'+data.pullFlowUrlHLS+'"></video>'
}
......@@ -704,7 +704,9 @@ $(function(){
html+='<video muted id="myVideo" autoplay webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="height:100%;object-fit:fill;position:absolute;z-index: 10" poster="" src="'+data.pullFlowUrlHLS+'"></video>'
}
$(".video-box").html(html)
if(/android/.test(ua)){
flvPlay(data.pullFlowUrl)
}
$("#myVideo").on("canplay",function(){
setTimeout(function() {
......@@ -982,6 +984,28 @@ $(function(){
}
})
})
function flvPlay(e) {
var player = document.getElementById('myVideo');
var mutedOk=true;
if (flvjs.isSupported()) {
flvPlayer = flvjs.createPlayer({
type: 'flv',
isLive:true,
// enableWorker:true,
// hasAudio:true,
// hasVideo:true,
url: e,
enableWorker: false, //不启用分离线程
enableStashBuffer: false, //关闭IO隐藏缓冲区
reuseRedirectedURL: true, //重用301/302重定向url,用于随后的请求,如查找、重新连接等。
autoCleanupSourceBuffer: true //自动清除缓存
});
flvPlayer.attachMediaElement(player);
flvPlayer.load(); //加载
}
}
function moreMc(){
$.ajax({
url:$ip+'frontPage/queryLiveUsers',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment