huangxiaojing 4 years ago
parent
commit
aa89e9d57a

+ 3 - 14
screenAndroid/WXdraw.js

@@ -14,7 +14,7 @@ if (numse <= 70) {
 }
 
 // 画笔大小
-var resolving;
+var resolving = 1; // 1: 竖屏;2:横屏;
 
 var url = window.location.href;
 url = url.split('/');
@@ -59,7 +59,7 @@ function doConnect() {
 		wsss.send(JSON.stringify(pings));
 		var bitRate = {
 			"data": {
-				"bitRate": 2243000
+				"bitRate": 1243000
 			},
 			"event": "bitRate"
 		}
@@ -84,18 +84,6 @@ function doConnect() {
 				url: '/pages/home/home'
 			})
 		}
-		// $.confirm({
-		// 	title: '提示',
-		// 	text: '连接断开,是否准备重连?',
-		// 	onOK: function () {
-		// 		doConnect();
-		// 	},
-		// 	onCancel: function () {
-		// 		wx.miniProgram.switchTab({
-		// 			url: '/pages/home/home'
-		// 		})
-		// 	}
-		// });
 	};
 }
 
@@ -175,6 +163,7 @@ var draw_graph = function (graphType, obj) {
 			}
 			wsss.send(ExexuteMove(JSON.stringify(ping), form.sn))
 		} else {
+			console.log('横屏');
 			var ping;
 			for (var i = 0; i < touchfor.length; i++) {
 				var cawidthXs = touchfor[i].pageX * (720 / vowidth)

+ 8 - 20
screenAndroid/WXtrialInterface.html

@@ -53,10 +53,10 @@
 		</div>
 		<div class="leftmains">
 			<div class="PictureQualityMain">
-				<div class="PictureQuality " data-id="3072000">高清</div>
-				<div class="PictureQuality avit" data-id="2243000">标清</div>
+				<div class="PictureQuality " data-id="1803000">高清</div>
+				<div class="PictureQuality avit" data-id="1243000">标清</div>
 				<div class="PictureQuality" data-id="400000">极速</div>
-				<div class="PictureQuality" data-id="400000">自动</div>
+				<div class="PictureQuality" data-id="200">自动</div>
 			</div>
 			<div class="operation">
 				<div class="upload" id="showsuss" data-text="uploads">
@@ -170,7 +170,7 @@
 		var parameters = GetRequest();
 		var ip = parameters["ip"];
 		var domainName = parameters["domainName"];
-		var socketURL = isWSS ? "wss://" + form.domainName + "/card?cardIp=" + form.ip : "ws://" + domainName + "/card?cardIp=" + ip;
+		var socketURL = isWSS ? "wss://" + domainName + "/card?cardIp=" + ip : "ws://" + domainName + "/card?cardIp=" + ip;
 
 		var jmuxer = new JMuxer({
 			node: 'playerVideo',
@@ -221,6 +221,8 @@
 
 			ws.addEventListener('open', function (event) {
 				ws.send(ConfigChannel("RK3923C1201900139"));
+				var checkBuffer = GetScreenState();
+				ws.send(checkBuffer);
 			});
 
 			ws.addEventListener('error', function (event) {
@@ -231,19 +233,6 @@
 						url: '/pages/home/home'
 					})
 				}
-				// $.confirm({
-				// 	title: '提示',
-				// 	text: '连接失败,是否准备重连?',
-				// 	onOK: function () {
-				// 		throttle(doConnect,500);
-				// 		// doConnect();
-				// 	},
-				// 	onCancel: function () {
-				// 		wx.miniProgram.switchTab({
-				// 			url: '/pages/home/home'
-				// 		})
-				// 	}
-				// });
 			});
 
 			ws.addEventListener('message', function (event) {
@@ -320,7 +309,6 @@
 				duration,
 				video,
 				audio;
-
 			if (input[0] == 0 && input[1] == 0 && input[2] == 0 && input[3] == 1) {
 				video = input;
 				duration = 24;
@@ -349,11 +337,11 @@
 					if (state == 1) {
 						console.log("安卓卡此时竖屏");
 						//竖屏处理
-						resolving = 0;
+						resolving = 1;
 					} else {
 						console.log("安卓卡此时横屏");
 						//横屏处理
-						resolving = 1;
+						resolving = 0;
 					}
 				}
 				if (input[23] == 0x0b) {

+ 3 - 3
screenIos/WXdraw.js

@@ -13,7 +13,7 @@ if (numse <= 70) {
 }
 
 //画笔大小
-var resolving;
+var resolving = 1; // 1: 竖屏;2:横屏;
 var url = window.location.href;
 url = url.split('/');
 
@@ -44,7 +44,7 @@ function doConnect() {
 		wsss.send(JSON.stringify(pings));
 		var bitRate = {
 			"data": {
-				"bitRate": 2243000
+				"bitRate": 1243000
 			},
 			"event": "bitRate"
 		}
@@ -83,7 +83,7 @@ $(".botmat1img").on("click", function () {
 	} else if (codes == "return") {
 		wsss.send(ExexuteKeyBoard(4, form.sn));
 	} else if (codes == "gengduo") {
-		wsss.send(ExexuteKeyBoard(187, form.sn));
+		wsss.send(ExexuteKeyBoard(187, form.sn)); 
 	}
 })
 //高清控制

+ 5 - 5
screenIos/WXtrialInterface.html

@@ -51,10 +51,10 @@
 		</div>
 		<div class="leftmains">
 			<div class="PictureQualityMain">
-				<div class="PictureQuality " data-id="3072000">高清</div>
-				<div class="PictureQuality avit" data-id="2243000">标清</div>
+				<div class="PictureQuality " data-id="1803000">高清</div>
+				<div class="PictureQuality avit" data-id="1243000">标清</div>
 				<div class="PictureQuality" data-id="400000">极速</div>
-				<div class="PictureQuality" data-id="400000">自动</div>
+				<div class="PictureQuality" data-id="200">自动</div>
 			</div>
 			<div class="operation">
 				<div class="upload" id="showsuss" data-text="uploads">
@@ -479,11 +479,11 @@
 					if (state == 1) {
 						console.log("安卓卡此时竖屏");
 						//竖屏处理
-						resolving = 0;
+						resolving = 1;
 					} else {
 						console.log("安卓卡此时横屏");
 						//横屏处理
-						resolving = 1;
+						resolving = 0;
 					}
 				}
 				if (input[23] == 0x0b) {

+ 2 - 2
screenIos/websocket.js

@@ -21,8 +21,8 @@ function doConnect() {
 
 	ws.addEventListener('open', function (event) {
 		ws.send(ConfigChannel("RK3923C1201900139"));
-		var buffer = RequestIFrame("RK3923C1201900139");
-		ws.send(buffer);
+		var checkBuffer = GetScreenState();
+		ws.send(checkBuffer);
 	});
 
 	ws.addEventListener('message', function (event) {