huangxiaojing 2 vuotta sitten
vanhempi
commit
7b91d79b43
2 muutettua tiedostoa jossa 6 lisäystä ja 4 poistoa
  1. 3 2
      static/screenAndroid/WXdraw.js
  2. 3 2
      static/screenIos/WXdraw.js

+ 3 - 2
static/screenAndroid/WXdraw.js

@@ -20,8 +20,7 @@ var url = window.location.href;
 url = url.split('/');
 
 var parameters = GetRequest();
-var videoWidth = Number(resolvingPower) ? Number(resolvingPower) : 720
-var videoHeight = videoWidth === 720 ? 1280 : 1920
+var videoWidth, videoHeight;
 var isControl = true; // 是否是观看模式
 var isAuth = parameters['authPhone']; // 是否是获取的云手机
 
@@ -41,6 +40,8 @@ function throttle(fn, delay) {
 }
 
 function doConnectDirectives() {
+  videoWidth = Number(resolvingPower) ? Number(resolvingPower) : 720
+  videoHeight = videoWidth === 720 ? 1280 : 1920
   wsss = new WebSocket(cUrl);
   wsss.binaryType = 'arraybuffer';
 

+ 3 - 2
static/screenIos/WXdraw.js

@@ -19,8 +19,7 @@ url = url.split('/');
 
 var parameters = GetRequest();
 
-var videoWidth = Number(resolvingPower) ? Number(resolvingPower) : 720
-var videoHeight = videoWidth === 720 ? 1280 : 1920
+var videoWidth, videoHeight;
 var isControl = true; // 是否是观看模式
 var isAuth = parameters['authPhone']; // 是否是获取的云手机
 var wsss;
@@ -41,6 +40,8 @@ function throttle(fn, delay) {
 }
 
 function doConnectDirectives() {
+  videoWidth = Number(resolvingPower) ? Number(resolvingPower) : 720
+  videoHeight = videoWidth === 720 ? 1280 : 1920
   wsss = new WebSocket(cUrl);
   wsss.binaryType = 'arraybuffer';