|
@@ -4,23 +4,35 @@
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<title></title>
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
+ <meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1,user-scalable=no">
|
|
|
<meta name="x5-orientation" content="portrait" />
|
|
|
<meta name="screen-orientation" content="portrait" />
|
|
|
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
|
|
|
+
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
+ <meta name="format-detection" content="telephone=no, email=no">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
<!-- 删除苹果默认的工具栏和菜单栏 -->
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
- <!-- 设置苹果工具栏颜 -->
|
|
|
+ <!-- 设置苹果工具栏颜��? -->
|
|
|
<meta name="format-detection" content="telphone=no, email=no">
|
|
|
<!-- 忽略页面中的数字识别为电话,忽略email识别 -->
|
|
|
- <!-- 启用360浏览器的极速模(webkit) -->
|
|
|
+ <!-- 启用360浏览器的极速模��?(webkit) -->
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<!-- 避免IE使用兼容模式 -->
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
- <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑 -->
|
|
|
+ <!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑��? -->
|
|
|
<meta name="HandheldFriendly" content="true">
|
|
|
- <!-- 微软的老式浏览 -->
|
|
|
+ <!-- 微软的老式浏览��? -->
|
|
|
<meta name="MobileOptimized" content="320">
|
|
|
+ <!-- uc强制竖屏 -->
|
|
|
+ <!-- <meta name="screen-orientation" content="portrait"> -->
|
|
|
+ <!-- QQ强制竖屏 -->
|
|
|
+ <!-- <meta name="x5-orientation" content="portrait"> -->
|
|
|
<!-- 不能旋转,问题出在这 -->
|
|
|
<!-- UC强制全屏 -->
|
|
|
<meta name="full-screen" content="yes">
|
|
@@ -30,21 +42,25 @@
|
|
|
<meta name="browsermode" content="application">
|
|
|
<!-- QQ应用模式 -->
|
|
|
<meta name="x5-page-mode" content="app">
|
|
|
- <!-- windows phone 点击无高 -->
|
|
|
+ <!-- windows phone 点击无高��? -->
|
|
|
<meta name="msapplication-tap-highlight" content="no">
|
|
|
+ <title></title>
|
|
|
<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;">
|
|
|
+
|
|
|
<div class="container" id="player">
|
|
|
<div class="muted" id="btnMuted">
|
|
|
<div class="control-right-img" data-id="1">
|
|
|
<img src="../static/img/xuanfu_icon.png">
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<div id="wine">
|
|
|
+
|
|
|
+ <!-- <video id="video1" muted="muted" x5-video-orientation="landscape" playsinline="true" autoplay="true"
|
|
|
+ webkit-playsinline="true" x5-playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="false" style="pointer-events: none;"></video> -->
|
|
|
<div id="box">
|
|
|
<canvas id="playCanvas" width="450" height="800"></canvas>
|
|
|
</div>
|
|
@@ -56,6 +72,7 @@
|
|
|
<div class="PictureQuality" data-id="400000">极速</div>
|
|
|
<div class="PictureQuality" data-id="400000">自动</div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="operation">
|
|
|
<div class="upload" id="showsuss" data-text="uploads">
|
|
|
<img src="../static/img/wx/shangchuan_icon.png">
|
|
@@ -70,75 +87,79 @@
|
|
|
<div>退出</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="bottommains">
|
|
|
<div class="botmat1">
|
|
|
<div class="botmat1img" data-text="gengduo">
|
|
|
<img src="../static/img/wx/gengduo_icon.png">
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="botmat1">
|
|
|
<div class="botmat1img" data-text="home">
|
|
|
<img src="../static/img/wx/home_icon.png">
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="botmat1">
|
|
|
<div class="botmat1img" data-text="return">
|
|
|
<img src="../static/img/wx/fanhui_icon.png">
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="mainbox" style="display: none;">
|
|
|
<div class="boxTitle">提示</div>
|
|
|
<div class="boxText">
|
|
|
<div>由于小程序的功能限制,此功能暂时</div>
|
|
|
<div>无法使用,请下载APP使用更多功能</div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="boxbt" onclick="cp(document.getElementById('user_ref_id'));">立即前往下载</div>
|
|
|
+
|
|
|
<div class="boximg"><img src="../static/img/wx/guanbi_icon.png"></div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="sbox" style="display: none;">
|
|
|
<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>
|
|
|
+
|
|
|
<div id="copy-txt" style="position: absolute;opacity: 0;">
|
|
|
<span id="user_ref_id">www.androidsCloud.com</span>
|
|
|
</div>
|
|
|
+
|
|
|
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
|
|
|
- <script type="text/javascript" src="jquery-1.11.0.min.js"></script>
|
|
|
+ <script src="../static/js/jquery-1.11.0.min.js"></script>
|
|
|
<!-- ffm软解 -->
|
|
|
<script type="text/javascript" src="helper.js"></script>
|
|
|
<script type="text/javascript" src="pcm-player.js"></script>
|
|
|
<script type="text/javascript" src="webgl.js"></script>
|
|
|
- <script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
|
|
- <script type="text/javascript" src="jquery-weui.min.js"></script>
|
|
|
- <script type="text/javascript" src="WXdraw.js?id=105"></script>
|
|
|
+ <script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
|
|
+ <script src="WXdraw.js?id=105"></script>
|
|
|
|
|
|
<script>
|
|
|
var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部
|
|
|
$('#wine').css({
|
|
|
"width": window.screen.width,
|
|
|
"height": window.screen.height - topwinHeight - 20,
|
|
|
- "position": "absolute"
|
|
|
+ "position": "absolute",
|
|
|
+
|
|
|
})
|
|
|
- $('.loading').css({
|
|
|
- "width": window.screen.width,
|
|
|
- "height": window.screen.height - topwinHeight - 20
|
|
|
- });
|
|
|
var winese = document.createElement("wine");
|
|
|
wine.style.top = "-" + winese + 'px';
|
|
|
|
|
|
var url = window.location.href;
|
|
|
- url = url.split('/');
|
|
|
+ url = url.split('/')
|
|
|
+ var query = window.location.search.substring(1);
|
|
|
+ var vars = query.split("&");
|
|
|
+ console.log(vars)
|
|
|
var baseUrl = "http://192.168.199.243";
|
|
|
- var form = {}
|
|
|
+ var data = {}
|
|
|
// 审核
|
|
|
$.ajax({
|
|
|
url: baseUrl + "/api/user/v1/config/download/isShow",
|
|
@@ -146,50 +167,175 @@
|
|
|
type: 'get',
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
+
|
|
|
if (data.data) {
|
|
|
$("#showsuss").show()
|
|
|
} else {
|
|
|
$("#showsuss").hide()
|
|
|
}
|
|
|
+ //
|
|
|
}
|
|
|
})
|
|
|
- var parameters = GetRequest();
|
|
|
- form.clientType = parameters['clientType'];
|
|
|
- form.diskName = parameters['clientType'];
|
|
|
-
|
|
|
- if (form.clientType == 1) {
|
|
|
- form.cardIp = parameters['cardIp'];
|
|
|
- form.port = parameters['port'];
|
|
|
- form.sn = parameters['sn'];
|
|
|
- form.demoTime = parameters['demoTime'];
|
|
|
- form.id = parameters['id'];
|
|
|
- } else if (form.clientType == 2) { // 分享屏幕
|
|
|
+ var clientType = vars.find(e => {
|
|
|
+ return e.startsWith('clientType')
|
|
|
+ }) || ''
|
|
|
+ // console.log(clientType)
|
|
|
+ data.clientType = clientType.substring(11, clientType.length)
|
|
|
+ // 小程序直接进入
|
|
|
+ var diskName = vars.find(e => {
|
|
|
+ return e.startsWith('diskName')
|
|
|
+ }) || ''
|
|
|
+
|
|
|
+ data.diskName = diskName.substring(9, diskName.length)
|
|
|
+
|
|
|
+ // document.title = decodeURI(data.diskName)
|
|
|
+ if (data.clientType == 1) {
|
|
|
+ var cardIp = vars.find(e => {
|
|
|
+ return e.startsWith('cardIp')
|
|
|
+ }) || ''
|
|
|
+ var port = vars.find(e => {
|
|
|
+ return e.startsWith('port')
|
|
|
+ }) || ''
|
|
|
+
|
|
|
+ var sn = vars.find(e => {
|
|
|
+ return e.startsWith('sn')
|
|
|
+ }) || ''
|
|
|
+ var demoTime = vars.find(e => {
|
|
|
+ return e.startsWith('demoTime')
|
|
|
+ }) || ''
|
|
|
+ var id = vars.find(e => {
|
|
|
+ return e.startsWith('id')
|
|
|
+ }) || ''
|
|
|
+
|
|
|
+
|
|
|
+ data.clientType = clientType.substring(11, clientType.length)
|
|
|
+
|
|
|
+ data.cardIp = cardIp.substring(7, cardIp.length)
|
|
|
+
|
|
|
+ data.port = port.substring(5, port.length)
|
|
|
+
|
|
|
+ data.sn = sn.substring(3, sn.length)
|
|
|
+
|
|
|
+ data.demoTime = demoTime.substring(9, demoTime.length)
|
|
|
+ data.id = id.substring(3, id.length)
|
|
|
+ console.log("打印sn卡", data.sn)
|
|
|
+
|
|
|
+ } else if (data.clientType == 2) { //分享屏幕
|
|
|
+ console.log("走到分享屏幕里面啦==========", data.clientTypes);
|
|
|
$(".leftmains").css({
|
|
|
"right": "-4rem"
|
|
|
})
|
|
|
$('.leftmains').hide()
|
|
|
$('.bottommains').hide()
|
|
|
$('#btnMuted').hide()
|
|
|
-
|
|
|
- form.id = parameters['id'];
|
|
|
- form.username = parameters['username'];
|
|
|
- form.ip = parameters['ip'];
|
|
|
- form.userCardId = parameters['userCardId'];
|
|
|
+ let ip = vars.find(e => {
|
|
|
+ return e.startsWith('ip')
|
|
|
+ }) || ''
|
|
|
+ var username = vars.find(e => {
|
|
|
+ return e.startsWith('username')
|
|
|
+ }) || ''
|
|
|
+ var id = vars.find(e => {
|
|
|
+ return e.startsWith('id')
|
|
|
+ }) || ''
|
|
|
+ var userCardId = vars.find(e => {
|
|
|
+ return e.startsWith('userCardId')
|
|
|
+ }) || ''
|
|
|
+ data.id = id.substring(3, id.length)
|
|
|
+ data.username = username.substring(9, username.length)
|
|
|
+ data.ip = ip.substring(3, ip.length)
|
|
|
+ data.userCardId = userCardId.substring(11, userCardId.length)
|
|
|
} else {
|
|
|
- form.username = parameters['username'];
|
|
|
- form.userCardId = parameters['userCardId'];
|
|
|
+ var username = vars.find(e => {
|
|
|
+ return e.startsWith('username')
|
|
|
+ }) || ''
|
|
|
+
|
|
|
+ var userCardId = vars.find(e => {
|
|
|
+ return e.startsWith('userCardId')
|
|
|
+ }) || ''
|
|
|
+ data.username = username.substring(9, username.length)
|
|
|
+ data.userCardId = userCardId.substring(11, userCardId.length)
|
|
|
+ console.log(data.ip)
|
|
|
}
|
|
|
|
|
|
var orientation = 0 //0 竖屏,1横屏
|
|
|
-
|
|
|
+ var winHeight = window.screen.height - window.innerHeight
|
|
|
+ // var urlss = url[2]
|
|
|
+ // var urlss='192.168.31.20'
|
|
|
+ // var urlss = "14.215.128.96"
|
|
|
+ var urlss = 'test.androidscloud.com'
|
|
|
document.body.addEventListener('touchmove', function (e) {
|
|
|
e.preventDefault()
|
|
|
}, {
|
|
|
passive: false
|
|
|
})
|
|
|
|
|
|
- // 初始化一下就可以了,
|
|
|
- var vConsole = new VConsole();
|
|
|
+ var warid = {
|
|
|
+ id: data.id,
|
|
|
+ type: 1,
|
|
|
+ sn: data.sn
|
|
|
+ }
|
|
|
+ //结束时间 type=2
|
|
|
+ var warids = {
|
|
|
+ id: data.id,
|
|
|
+ type: 2,
|
|
|
+ sn: data.sn
|
|
|
+ }
|
|
|
+ //撤销的array
|
|
|
+ var cancelList = new Array();
|
|
|
+ //撤销的次数
|
|
|
+ var cancelIndex = 0;
|
|
|
+ var inputType = 0 //输入类型 0:手写,1:键盘输入
|
|
|
+ //判断是否ie
|
|
|
+ var IE_HACK = (/msie/i.test(navigator.userAgent) &&
|
|
|
+ !/opera/i.test(navigator.userAgent));
|
|
|
+
|
|
|
+ $(function () {
|
|
|
+ initCanvas();
|
|
|
+ });
|
|
|
+ //初始化
|
|
|
+ var initCanvas = function () {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ window.onload = function () { };
|
|
|
+
|
|
|
+ $("#voew").on("click", function () { })
|
|
|
+
|
|
|
+ $("#box").on("click", function () {
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ $('#mocan').on('click', function () {
|
|
|
+ draw_graph('pencil', this)
|
|
|
+ })
|
|
|
+
|
|
|
+ // //初始化一下就可以了,
|
|
|
+ let vConsole = new VConsole();
|
|
|
+ // //你打印的数据 比如
|
|
|
+ console.log('test');
|
|
|
+ //就可像小程序一样的看了和调试了。
|
|
|
+ $('.no-ne-an').on('click', function () {
|
|
|
+ //结束时间 type=2
|
|
|
+ let warids = {
|
|
|
+ id: data.id,
|
|
|
+ type: 2,
|
|
|
+ sn: data.sn
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + "/api/game/v1/cloudGame/dev/getSn",
|
|
|
+ data: warid,
|
|
|
+ type: 'get',
|
|
|
+ dataType: 'json',
|
|
|
+ success: function (data) {
|
|
|
+ history.go(-1)
|
|
|
+ if (data.status == 0) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ alert(data.msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
var btnMuted = document.querySelector("#btnMuted");
|
|
|
btnMuted && (function () {
|
|
@@ -219,7 +365,7 @@
|
|
|
left: rect.left,
|
|
|
width: rect.width,
|
|
|
height: rect.height
|
|
|
- }; // 部分低版本浏览器,该属性为只读
|
|
|
+ }; //部分低版本浏览器,该属性为只读
|
|
|
if (loc) {
|
|
|
rect.left = loc.left;
|
|
|
rect.top = loc.top;
|
|
@@ -235,6 +381,7 @@
|
|
|
left = Math.max(left, minX);
|
|
|
top = Math.min(top, maxY);
|
|
|
top = Math.max(top, minY);
|
|
|
+ console.log(rect.top, top, loc);
|
|
|
if (loc || top !== rect.top || left !== rect.left) {
|
|
|
btnMuted.style.cssText += "left:" + left + "px;top:" + top + "px;";
|
|
|
}
|
|
@@ -284,6 +431,7 @@
|
|
|
fixLoc();
|
|
|
} else {
|
|
|
//按点击处理
|
|
|
+
|
|
|
var set = $('.control-right-img').attr("data-id")
|
|
|
if (set == '1') {
|
|
|
$('.control-right-img').attr({
|
|
@@ -292,7 +440,10 @@
|
|
|
$(".leftmains").css({
|
|
|
"right": "-4rem"
|
|
|
})
|
|
|
+ // console.log(players)
|
|
|
+ // players.play();
|
|
|
} else {
|
|
|
+
|
|
|
$('.control-right-img').attr({
|
|
|
"data-id": "1"
|
|
|
})
|
|
@@ -303,7 +454,6 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
btnMuted.addEventListener("touchstart", function (e) {
|
|
|
e.preventDefault();
|
|
|
toMove = false;
|
|
@@ -319,6 +469,7 @@
|
|
|
window.addEventListener("touchend", touchend, {
|
|
|
passive: false
|
|
|
});
|
|
|
+
|
|
|
}, {
|
|
|
passive: false
|
|
|
});
|
|
@@ -335,13 +486,13 @@
|
|
|
})
|
|
|
})
|
|
|
|
|
|
- // 剪切板
|
|
|
+ // 剪切板
|
|
|
$(".sboxbu").on("click", function () {
|
|
|
$(".sbox").css({
|
|
|
"display": "none"
|
|
|
})
|
|
|
})
|
|
|
- // 剪切板
|
|
|
+ // 剪切板
|
|
|
$(".uploadss").on("click", function () {
|
|
|
$(".sbox").css({
|
|
|
"display": "none"
|
|
@@ -391,6 +542,7 @@
|
|
|
|
|
|
Module = {};
|
|
|
Module.onRuntimeInitialized = function () {
|
|
|
+ console.log("Wasm 加载成功!")
|
|
|
isFinish = true;
|
|
|
}
|
|
|
|
|
@@ -398,7 +550,7 @@
|
|
|
var retPtr = Module._malloc(4 * 5 * 1024); //接收的数据
|
|
|
var inputPtr = Module._malloc(4 * data.length); //输入数据
|
|
|
|
|
|
- for (var i = 0; i < data.length; i++) {
|
|
|
+ for (i = 0; i < data.length; i++) {
|
|
|
Module.HEAPU8[(inputPtr) + i] = data[i]; //转换为堆数据
|
|
|
}
|
|
|
|
|
@@ -406,16 +558,20 @@
|
|
|
|
|
|
if (pcmLen >= 0) {
|
|
|
var pcmData = new Uint8Array(pcmLen);
|
|
|
- for (var i = 0; i < pcmLen; i++) {
|
|
|
+ for (i = 0; i < pcmLen; i++) {
|
|
|
pcmData[i] = Module.HEAPU8[(retPtr) + i]
|
|
|
}
|
|
|
|
|
|
player.feed(pcmData);
|
|
|
+ } else {
|
|
|
+ console.log("%d帧 aac 解码失败, %d", decodeCount, pcmLen);
|
|
|
}
|
|
|
+
|
|
|
decodeCount++;
|
|
|
Module._free(inputPtr);
|
|
|
Module._free(retPtr);
|
|
|
}
|
|
|
+
|
|
|
var decodeWoker = new Worker('decoder.js');
|
|
|
var myVideo = document.getElementById("playCanvas");
|
|
|
decodeWoker.onmessage = function (event) {
|
|
@@ -425,18 +581,22 @@
|
|
|
case 0:
|
|
|
break;
|
|
|
case 1:
|
|
|
+ var time = new Date().getTime();
|
|
|
webglPlayer.renderFrame(objData.data, 720, 1280, 720 * 1280, (720 / 2) * (1280 / 2));
|
|
|
- $('.weui-mask_transparent').hide()
|
|
|
- $('.weui-toast').hide()
|
|
|
- $('.loading').hide()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ if (typeof (Worker) !== "undefined") {
|
|
|
+ console.log("支持webworker");
|
|
|
+ } else {
|
|
|
+ alert("不支持webworker");
|
|
|
+ }
|
|
|
+
|
|
|
var isFinish = false;
|
|
|
var webglPlayer = new WebGLPlayer(myVideo, {
|
|
|
preserveDrawingBuffer: false
|
|
|
});
|
|
|
-
|
|
|
function GetRequest() {
|
|
|
var url = location.search; // 获取url中"?"符后的字串
|
|
|
var obj = new Object();
|
|
@@ -449,35 +609,34 @@
|
|
|
}
|
|
|
return obj;
|
|
|
}
|
|
|
+ var parameters = GetRequest();
|
|
|
var ip = parameters["ip"];
|
|
|
var domainName = parameters["domainName"];
|
|
|
var webSocketWorker = new Worker('websocket.js?ip=' + ip + '&domainName=' + domainName);
|
|
|
+ var startTime = new Date().getTime();
|
|
|
+
|
|
|
+
|
|
|
|
|
|
webSocketWorker.onmessage = function (event) {
|
|
|
- var input = event.data;
|
|
|
+ var input = event.data
|
|
|
if (input[0] == 0xff) {
|
|
|
decodeAAC(input);
|
|
|
}
|
|
|
if (input[0] == 0 && input[1] == 0 && input[2] == 0 && input[3] == 1) {
|
|
|
decodeWoker.postMessage(event.data);
|
|
|
}
|
|
|
- if (event.data === 'close') {
|
|
|
- $.confirm({
|
|
|
- title: '提示',
|
|
|
- text: '连接断开,是否准备重连?',
|
|
|
- onOK: function () {
|
|
|
- webSocketWorker.postMessage('restart');
|
|
|
- },
|
|
|
- onCancel: function () {
|
|
|
- wx.miniProgram.switchTab({
|
|
|
- url: '/pages/home/home'
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
- function Close() { // webworker 关闭,清理
|
|
|
+ document.addEventListener("visibilitychange", () => {
|
|
|
+ if (document.visibilityState == "visible") {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ console.log("页面不可见");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ function Close() //webworker 关闭,清理
|
|
|
+ {
|
|
|
var cmd = {
|
|
|
cmd: 0
|
|
|
};
|
|
@@ -488,9 +647,44 @@
|
|
|
}
|
|
|
|
|
|
var isDrag = false;
|
|
|
+ // myVideo.onmousedown = function (event) {
|
|
|
+ // console.log('5555555555安卓卡', data.sn)
|
|
|
+ // if (event.button == 0) {
|
|
|
+ // var posX = event.offsetX * 720 * 1.0 / myVideo.clientWidth;
|
|
|
+ // var posY = event.offsetY * 1280 * 1.0 / myVideo.clientHeight;
|
|
|
+ // var buffer = ExexuteMouseDown(posX.toString(), posY.toString(), data.sn);
|
|
|
+ // // console.log('55555', buffer)
|
|
|
+ // webSocketWorker.postMessage(buffer);
|
|
|
+ // isDrag = true;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // myVideo.onmousemove = function (event) {
|
|
|
+ // if (isDrag && event.button == 0) {
|
|
|
+ // var posX = event.offsetX * 720 * 1.0 / myVideo.clientWidth;
|
|
|
+ // var posY = event.offsetY * 1280 * 1.0 / myVideo.clientHeight;
|
|
|
+ // var buffer = ExexuteMouseMove(posX.toString(), posY.toString(), data.sn);
|
|
|
+ // console.log('55555', buffer)
|
|
|
+ // webSocketWorker.postMessage(buffer);
|
|
|
+ // console.log("移动位置 %d, %d", posX, posY);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // myVideo.onmouseup = function (event) {
|
|
|
+ // console.log('5555555555')
|
|
|
+ // isDrag = false;
|
|
|
+ // var posX = event.offsetX * 720 * 1.0 / myVideo.clientWidth;
|
|
|
+ // var posY = event.offsetY * 1280 * 1.0 / myVideo.clientHeight;
|
|
|
+ // var buffer = ExexuteMouseUp(posX.toString(), posY.toString(), data.sn);
|
|
|
+ // webSocketWorker.postMessage(buffer);
|
|
|
+
|
|
|
+ // }
|
|
|
|
|
|
myVideo.onkeydown = function (event) {
|
|
|
- ExexuteKeyDown(e.keyCode, form.sn);
|
|
|
+ console.log('5555555555')
|
|
|
+ ExexuteKeyDown(e.keyCode, data.sn);
|
|
|
}
|
|
|
</script>
|
|
|
<script type="text/javascript" src="aac.js"></script>
|