<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<script src="js/mui.min.js"></script>
<script src="js/Common.js"></script>
<script src="js/vue.min.js"></script>
<title>HOB直播</title>
</head>
<body>
<section class="live_room" style="background: none;">
<div id="pusher" style="position:absolute;left:0;top:0;width:100%;height:100%">
</div>
</section>
<script>
var wsub = null;
function createSubview(){
if(!wsub) {
//var topoffset = document.getElementById('video').offsetTop;
wsub=plus.webview.create('live_room_sub.html','sub',
{top:'0px',height:'100%',position:'static',scrollIndicator:'none',background:'transparent'},
{
EventID: liveinfo
});
plus.webview.currentWebview().append(wsub);
}
wsub.show();
}
</script>
</body>
</html>
//*** 在load完成或开始播放时!执行createSubview(),创建个新的webview窗口,并设为子窗口。
子窗口背景透明就成了!
下面是live_room_sub.html的内容
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="public_hob2_app/css/nochangzhu.css">
<link rel="stylesheet" href="public_hob2_app/css/public.css">
<link rel="stylesheet" href="public_hob2_app/font/iconfont.css">
<script src="js/mui.min.js"></script>
<script src="js/Common.js"></script>
<script src="js/vue.min.js"></script>
<title>直播</title>
</head>
<body>
<section class="live_room" style="background: none !important;" id="messshowtext">
<div class="live_user">
<dl class="user">
<dt class="oImg"><img src="public_hob2_app/pic/user.jpg"></dt>
<dt class="fm">
<div class="name">{{playtext}}</div>
<p>{{online}}人观看</p>
</dt>
</dl>
<button class="close iconfont" EID="exec" CKID="mui.back()"></button>
</div>
<ul class="user_data_list">
<li v-for="(item, index) in items">
<div class="txt"><span>{{item.uname}}:</span><span class="ds">{{item.megtxt}}</span></div>
</li>
<li v-for="(item, index) in items">
<div class="txt"><span>{{item.uname}}:</span><span class="jy">{{item.megtxt}}</span></div>
</li>
<!--<li>
<img src="../public/pic/indexHead.jpg" alt="">
<div class="txt"><span>南瓜打赏清清哥10和钻</span></div>
</li>
<li>
<img src="../public/pic/indexHead.jpg" alt="">
<div class="txt"><span>南瓜:</span>哦</div>
</li>-->
</ul>
<div class="input_live" style="padding: 0 12px;box-sizing: border-box;">
<div class="btns_nc">
<button EID="exec" CKID="send_cmd('livecmd','start')">{{playname}}</button>
<button EID="exec" CKID="send_cmd('livecmd','switchCamera')">切换镜头</button>
<button EID="exec" CKID="send_cmd('livecmd','beauty')">开关美颜</button>
<button EID="exec" CKID="send_cmd('livecmd','whiteness')">开关美白</button>
</div>
</div>
</section>
<script src="appjs/live_room_sub.js"></script>
</body>
</html>
3 个回复
3***@qq.com (作者) - 90后IT男
没人么?
老向
双webview
老向
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<script src="js/mui.min.js"></script>
<script src="js/Common.js"></script>
<script src="js/vue.min.js"></script>
<title>HOB直播</title>
</head>
<body>
<section class="live_room" style="background: none;">
<div id="pusher" style="position:absolute;left:0;top:0;width:100%;height:100%">
</div>
</section>
<script>
var wsub = null;
function createSubview(){
if(!wsub) {
//var topoffset = document.getElementById('video').offsetTop;
wsub=plus.webview.create('live_room_sub.html','sub',
{top:'0px',height:'100%',position:'static',scrollIndicator:'none',background:'transparent'},
{
EventID: liveinfo
});
plus.webview.currentWebview().append(wsub);
}
wsub.show();
}
</script>
</body>
</html>
//*** 在load完成或开始播放时!执行createSubview(),创建个新的webview窗口,并设为子窗口。
子窗口背景透明就成了!
下面是live_room_sub.html的内容
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="public_hob2_app/css/nochangzhu.css">
<link rel="stylesheet" href="public_hob2_app/css/public.css">
<link rel="stylesheet" href="public_hob2_app/font/iconfont.css">
<script src="js/mui.min.js"></script>
<script src="js/Common.js"></script>
<script src="js/vue.min.js"></script>
<title>直播</title>
</head>
<body>
<section class="live_room" style="background: none !important;" id="messshowtext">
<div class="live_user">
<dl class="user">
<dt class="oImg"><img src="public_hob2_app/pic/user.jpg"></dt>
<dt class="fm">
<div class="name">{{playtext}}</div>
<p>{{online}}人观看</p>
</dt>
</dl>
<button class="close iconfont" EID="exec" CKID="mui.back()"></button>
</div>
<ul class="user_data_list">
<li v-for="(item, index) in items">
<div class="txt"><span>{{item.uname}}:</span><span class="ds">{{item.megtxt}}</span></div>
</li>
<li v-for="(item, index) in items">
<div class="txt"><span>{{item.uname}}:</span><span class="jy">{{item.megtxt}}</span></div>
</li>
<!--<li>
<img src="../public/pic/indexHead.jpg" alt="">
<div class="txt"><span>南瓜打赏清清哥10和钻</span></div>
</li>
<li>
<img src="../public/pic/indexHead.jpg" alt="">
<div class="txt"><span>南瓜:</span>哦</div>
</li>-->
</ul>
<div class="input_live" style="padding: 0 12px;box-sizing: border-box;">
<div class="btns_nc">
<button EID="exec" CKID="send_cmd('livecmd','start')">{{playname}}</button>
<button EID="exec" CKID="send_cmd('livecmd','switchCamera')">切换镜头</button>
<button EID="exec" CKID="send_cmd('livecmd','beauty')">开关美颜</button>
<button EID="exec" CKID="send_cmd('livecmd','whiteness')">开关美白</button>
</div>
</div>
</section>
<script src="appjs/live_room_sub.js"></script>
</body>
</html>