Browse Source

推流不稳定

heyang 4 years ago
parent
commit
d3311fe2ca
1 changed files with 2 additions and 0 deletions
  1. 2 0
      screenAndroid/WXtrialInterface.html

+ 2 - 0
screenAndroid/WXtrialInterface.html

@@ -229,6 +229,7 @@
 			ws.binaryType = 'arraybuffer';
 
 			ws.onclose = function (e) {
+				ws.close();
 				doConnect();
 				// console.log(e);
 				// $.confirm({
@@ -252,6 +253,7 @@
 
 			ws.addEventListener('error', function (event) {
 				console.log(event);
+				ws.close();
 				doConnect();
 				// $.confirm({
 				// 	title: '提示',