|
@@ -472,6 +472,24 @@
|
|
|
if (input[0] == 0 && input[1] == 0 && input[2] == 0 && input[3] == 1) {
|
|
|
decodeWoker.postMessage(event.data);
|
|
|
}
|
|
|
+ if (input[0] == 0x68) {
|
|
|
+ if (input[23] == 0x05) { //横竖屏标识
|
|
|
+ var state = CheckScreenDirection(input.slice(24, 24 + 8));
|
|
|
+
|
|
|
+ if (state == 1) {
|
|
|
+ console.log("安卓卡此时竖屏");
|
|
|
+ //竖屏处理
|
|
|
+ resolving = 0;
|
|
|
+ } else {
|
|
|
+ console.log("安卓卡此时横屏");
|
|
|
+ //横屏处理
|
|
|
+ resolving = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (input[23] == 0x0b) {
|
|
|
+ console.log("多端登陆");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (event.data === 'close') {
|
|
|
webSocketWorker.postMessage('restart');
|
|
|
}
|