huangxiaojing 4 lat temu
rodzic
commit
eedd4eca23

+ 0 - 74
screenAndroid/WXtrialInterface.html

@@ -126,18 +126,6 @@
 	<script type="text/javascript" src="jmuxer.js"></script>
 	<script>
 		var isAudioPlay = false;
-		// $.alert({
-		// 	title: '提示',
-		// 	text: '开始使用云手机',
-		// 	onOK: function () {
-		// 		var video = document.getElementById("playerVideo");
-		// 		video.play();
-		// 		isAudioPlay = true;
-		// 		$('.weui-mask_transparent').hide();
-		// 		$('.weui-toast').hide();
-		// 		$('.loading').hide();
-		// 	}
-		// });
 		$(function () {
 			// test 的点击事件
 			$('body').click(function () {
@@ -150,12 +138,6 @@
 			});
 			$("body").click();
 		})
-		// document.addEventListener('touchstart', function () {
-		// 	var video = document.getElementById("playerVideo");
-		// 	var audio = document.getElementById("audioPlayer");
-		// 	video.play();
-		// 	audio.play();
-		// }, false);
 		var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部
 		$('#wine').css({
 			"width": window.screen.width,
@@ -202,32 +184,6 @@
 			curTime = new Date().getTime();
 
 			var myPlay = document.getElementById("wine");
-			// myPlay.onmousedown = function (event) {
-			// 	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());
-			// 		ws.send(buffer);
-			// 		isDrag = true;
-			// 	}
-			// }
-
-			// myPlay.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());
-			// 		ws.send(buffer);
-			// 	}
-			// }
-
-			// myPlay.onmouseup = function (event) {
-			// 	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());
-			// 	ws.send(buffer);
-			// }
 
 			myPlay.onkeydown = function (event) {
 				ExexuteKeyDown(e.keyCode);
@@ -242,20 +198,6 @@
 			ws.onclose = function (e) {
 				ws.close();
 				doConnect();
-				// console.log(e);
-				// $.confirm({
-				// 	title: '提示',
-				// 	text: '连接断开,是否准备重连?',
-				// 	onOK: function () {
-				// 		window.location.reload();
-				// 		// doConnect();
-				// 	},
-				// 	onCancel: function () {
-				// 		wx.miniProgram.switchTab({
-				// 			url: '/pages/home/home'
-				// 		})
-				// 	}
-				// });
 			}
 
 			ws.addEventListener('open', function (event) {
@@ -266,19 +208,6 @@
 				console.log(event);
 				ws.close();
 				doConnect();
-				// $.confirm({
-				// 	title: '提示',
-				// 	text: '连接失败,是否准备重连?',
-				// 	onOK: function () {
-				// 		throttle(doConnect,500);
-				// 		// doConnect();
-				// 	},
-				// 	onCancel: function () {
-				// 		wx.miniProgram.switchTab({
-				// 			url: '/pages/home/home'
-				// 		})
-				// 	}
-				// });
 			});
 
 			ws.addEventListener('message', function (event) {
@@ -295,9 +224,6 @@
 				if (data.video != null) { //喂视频
 					if (isFeed) {
 						jmuxer.feed(data);
-						// $('.weui-mask_transparent').hide()
-						// $('.weui-toast').hide()
-						// $('.loading').hide()
 					}
 				}
 			});

+ 7 - 19
screenIos/WXtrialInterface.html

@@ -135,14 +135,14 @@
 		});
 		var winese = document.createElement("wine");
 		wine.style.top = "-" + winese + 'px';
-		var isAudioPlay = false
-		$.alert({
-			title: '提示',
-			text: '开始使用云手机',
-			onOK: function () {
+		var isAudioPlay = false;
+		$(function () {
+			// test 的点击事件
+			$('body').click(function () {
 				isAudioPlay = true;
-			}
-		});
+			});
+			$("body").click();
+		})
 		var url = window.location.href;
 		url = url.split('/');
 		var baseUrl = "http://192.168.199.243";
@@ -474,18 +474,6 @@
 			}
 			if (event.data === 'close') {
 				webSocketWorker.postMessage('restart');
-				// $.confirm({
-				// 	title: '提示',
-				// 	text: '连接断开,是否准备重连?',
-				// 	onOK: function () {
-				// 		webSocketWorker.postMessage('restart');
-				// 	},
-				// 	onCancel: function () {
-				// 		wx.miniProgram.switchTab({
-				// 			url: '/pages/home/home'
-				// 		})
-				// 	}
-				// });
 			}
 		}