|
@@ -32,6 +32,8 @@
|
|
|
<!-- windows phone 点击无高? -->
|
|
|
<meta name="msapplication-tap-highlight" content="no">
|
|
|
<link rel="stylesheet" type="text/css" href="css/WXtrialInterface.css" />
|
|
|
+ <link rel="stylesheet" href="https://cdn.bootcss.com/weui/1.1.3/style/weui.min.css">
|
|
|
+ <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css">
|
|
|
</head>
|
|
|
|
|
|
<body class="scroll h-player" style="overscroll-behavior: contain;">
|
|
@@ -101,6 +103,12 @@
|
|
|
<div class="sboxText">下载地址已复制到剪切板</div>
|
|
|
<div class="sboxbu">确定</div>
|
|
|
</div>
|
|
|
+ <div class="loading"></div>
|
|
|
+ </div>
|
|
|
+ <div class="weui-mask_transparent"></div>
|
|
|
+ <div class="weui-toast weui_loading_toast weui-toast--visible">
|
|
|
+ <div class="weui_loading"><i class="weui-loading weui-icon_toast"></i></div>
|
|
|
+ <p class="weui-toast_content">数据加载中</p>
|
|
|
</div>
|
|
|
|
|
|
<body oncontextmenu="Back()">
|
|
@@ -116,6 +124,8 @@
|
|
|
<script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
|
|
<script type="text/javascript" src="WXdraw.js?v=110"></script>
|
|
|
<script type="text/javascript" src="jmuxer.js"></script>
|
|
|
+ <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
|
|
+ <script src="https://cdn.bootcss.com/jquery-weui/1.2.1/js/jquery-weui.min.js"></script>
|
|
|
<script>
|
|
|
document.addEventListener('touchstart', function () {
|
|
|
var video = document.getElementById("playerVideo");
|
|
@@ -128,6 +138,10 @@
|
|
|
"height": window.screen.height - topwinHeight - 20,
|
|
|
"position": "absolute"
|
|
|
});
|
|
|
+ $('.loading').css({
|
|
|
+ "width": window.screen.width,
|
|
|
+ "height": window.screen.height - topwinHeight - 20
|
|
|
+ });
|
|
|
var winese = document.createElement("wine");
|
|
|
wine.style.top = "-" + winese + 'px';
|
|
|
|
|
@@ -199,8 +213,18 @@
|
|
|
ws.binaryType = 'arraybuffer';
|
|
|
|
|
|
ws.onclose = function (e) {
|
|
|
- alert("websocket连接断开,准备重连");
|
|
|
- doConnect();
|
|
|
+ $.confirm({
|
|
|
+ title: '提示',
|
|
|
+ text: '连接断开,是否准备重连?',
|
|
|
+ onOK: function () {
|
|
|
+ doConnect();
|
|
|
+ },
|
|
|
+ onCancel: function () {
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
+ url: '/pages/home/home'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
ws.addEventListener('open', function (event) {
|
|
@@ -208,7 +232,18 @@
|
|
|
});
|
|
|
|
|
|
ws.addEventListener('error', function (event) {
|
|
|
- console.log("连接失败");
|
|
|
+ $.confirm({
|
|
|
+ title: '提示',
|
|
|
+ text: '连接失败,是否准备重连?',
|
|
|
+ onOK: function () {
|
|
|
+ doConnect();
|
|
|
+ },
|
|
|
+ onCancel: function () {
|
|
|
+ wx.miniProgram.switchTab({
|
|
|
+ url: '/pages/home/home'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
ws.addEventListener('message', function (event) {
|
|
@@ -225,6 +260,9 @@
|
|
|
if (data.video != null) { //喂视频
|
|
|
if (isFeed) {
|
|
|
jmuxer.feed(data);
|
|
|
+ $('.weui-mask_transparent').hide()
|
|
|
+ $('.weui-toast').hide()
|
|
|
+ $('.loading').hide()
|
|
|
}
|
|
|
}
|
|
|
});
|