Commit bf21087d by libai

测试

parent a1ab7a8c
Showing with 20 additions and 36 deletions
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,7 +32,6 @@
<link rel="stylesheet" href="../css/layer.css">
<link rel="stylesheet" href="css/liveRoom.css?v=2022111808">
<link rel="stylesheet" href="../css/login.css?v=2022111801">
<link rel="stylesheet" href="../videojs/video-js.min.css">
<script src="https://accounts.google.com/gsi/client" async defer></script>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
<script src="../lib/hello.js"></script>
......@@ -210,7 +209,7 @@
</div> -->
</div>
<div class="video-box">
<div id="video-box" class="video-box">
<!-- <video muted autoplay src="http://pull.bsy.ourpow.com/vod/11128395/playlist.m3u8?sign=3690163a49cadadf680746273df3623b&t=6420fe47"> -->
</div>
......@@ -567,7 +566,7 @@
<!-- <script src="../lib/inobounce.js"></script> -->
<!-- <script src="lib/fingerprint2.js"></script> -->
<script src="../lib/login.js?v=2022111801"></script>
<script src="../videojs/video.min.js"></script>
<script src="../lib/xgplayer.js" type="text/javascript"></script>
<script>
$(function(){
var dHeight=$(document).height()
......@@ -688,42 +687,27 @@ $(function(){
loadOutNum=1000
}
var soundOk=false
var ua = window.navigator.userAgent.toLowerCase();
if (/android/.test(ua)) {
if(mySound==1){
$(".sound-btn").attr("data-type","1")
$(".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" class="video-js" autoplay preload="auto" poster="">';
html+='<source src="'+data.pullFlowUrlHLS+'" type="rtmp/flv">';
html+='</video>';
// var ua = window.navigator.userAgent.toLowerCase();
// if (/android/.test(ua)) {
// if(mySound==1){
// $(".sound-btn").attr("data-type","1")
// $(".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>'
}else{
html+='<video id="myVideo" class="video-js" autoplay preload="auto" poster="" >';
html+='<source src="'+data.pullFlowUrlHLS+'" type="rtmp/flv">';
html+='</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>'
}
}else{
html+='<video id="myVideo" class="video-js" autoplay preload="auto" poster="" >';
html+='<source src="'+data.pullFlowUrlHLS+'" type="rtmp/flv">';
html+='</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>'
}
$(".video-box").html(html)
let options = {};
let player = videojs('myVideo', options, function onPlayerReady() {
videojs.log('播放器准备好了!');
// In this context, `this` is the player that was created by Video.js.
this.play();
this.on('ended', function() {
videojs.log('播放结束!');
});
// }
// $(".video-box").html(html)
let player = new Player({
id: 'video-box',
url: ''+data.pullFlowUrlHLS+'',
fluid: true,
autoplay: true,
volume: 0
});
$("#myVideo").on("canplay",function(){
setTimeout(function() {
......
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