|
@@ -32,8 +32,8 @@ form.ip = parameters["ip"];
|
|
form.domainName = parameters["domainName"];
|
|
form.domainName = parameters["domainName"];
|
|
var isWSS = true;
|
|
var isWSS = true;
|
|
var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken;
|
|
var cUrl = isWSS ? "wss://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken : "ws://" + form.domainName + "?cardIp=" + form.ip + "&token=" + cardToken;
|
|
-var videoWidth = 720
|
|
|
|
-var videoHeight = 1280
|
|
|
|
|
|
+var videoWidth = parameters['mealType'] === "STARPRO" || parameters['mealType'] === "STAR" ? 1080 : 720
|
|
|
|
+var videoHeight = parameters['mealType'] === "STARPRO" || parameters['mealType'] === "STAR" ? 1920 : 1280
|
|
|
|
|
|
var wsss, errorTime = 0;
|
|
var wsss, errorTime = 0;
|
|
var first = true;
|
|
var first = true;
|
|
@@ -75,11 +75,6 @@ function doConnect() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
wsss.send(JSON.stringify(screenPic));
|
|
wsss.send(JSON.stringify(screenPic));
|
|
- // 获取分辨率
|
|
|
|
- var phoneSize = {
|
|
|
|
- "type": "getPhoneSize"
|
|
|
|
- }
|
|
|
|
- wsss.send(JSON.stringify(phoneSize));
|
|
|
|
};
|
|
};
|
|
wsss.onerror = function (evt) {
|
|
wsss.onerror = function (evt) {
|
|
wsss.close();
|
|
wsss.close();
|
|
@@ -106,13 +101,6 @@ function doConnect() {
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (result.type === 'getPhoneSize') {
|
|
|
|
- if (result.data.status === 0) {
|
|
|
|
- videoWidth = result.data.width
|
|
|
|
- videoHeight = result.data.height
|
|
|
|
- }
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var unit8Arr = new Uint8Array(result);
|
|
var unit8Arr = new Uint8Array(result);
|
|
if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
|
|
if (unit8Arr[0] == 0x68 && unit8Arr[1] == 0x09 && first) {
|
|
first = false;
|
|
first = false;
|
|
@@ -194,7 +182,6 @@ var draw_graph = function (graphType, obj) {
|
|
var ping = resolving == 0 ?
|
|
var ping = resolving == 0 ?
|
|
{ "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
|
|
{ "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": acrossWidthX.toFixed(2), "y": acrossHeightY.toFixed(2) }, "type": "event" } :
|
|
{ "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
|
|
{ "data": { "action": 0, "count": ongoingTouches.length, "pointerId": touchfor[i].identifier, "x": verticalWidthX.toFixed(2), "y": verticalHeightY.toFixed(2) }, "type": "event" };
|
|
- console.log('x:' + ping.data.x, 'y:' + ping.data.y);
|
|
|
|
wsss.send(JSON.stringify(ping));
|
|
wsss.send(JSON.stringify(ping));
|
|
}
|
|
}
|
|
canDraw = true;
|
|
canDraw = true;
|