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