From dd10ee2243fcfc1a0f6ae340c4c1732e5c5d1cf2 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 12 Aug 2021 10:23:23 +0800
Subject: [PATCH] 视频1

---
 components/submit/submit.vue |   33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/components/submit/submit.vue b/components/submit/submit.vue
index d2cd28e..de25bbb 100644
--- a/components/submit/submit.vue
+++ b/components/submit/submit.vue
@@ -259,6 +259,9 @@
 			//开始音频
 			openAudio(val) { //Mains
 				// console.log(this.names)
+				// var socketOpen = false;
+
+
 				uni.navigateTo({
 					url: '../videoCall/videoCall?state=' + val + '&type=audio'
 				});
@@ -271,17 +274,37 @@
 			},
 			//开始视频
 			openVideo(val) { //Mains
+				// uni.onSocketOpen(function(res) {
+				// 	// socketOpen = true;
+				// 	console.log('持续连接成功')
+				// 	sendSocketMessage();
+				// });
+
+				// function sendSocketMessage() {
+				// 	var data = {
+				// 		name: this.$store.state.puserName,
+				// 		id: this.names[1],
+				// 		// id: state.puserID,
+				// 		type: 'video'
+				// 	}
+				// 	// if (socketOpen) {
+				// 	uni.sendSocketMessage({
+				// 		data: JSON.stringify(data)
+				// 	});
+				// 	// }
+				// }
+			
 				uni.navigateTo({
 					url: '../videoCall/videoCall?state=' + val + '&type=video' + '&myname=' + this.names[0] +
 						'&toname=' + this.names[1]
 				});
 			},
 			//接收视频
-			receiveVideo(val, room) { //Receiver
-				uni.navigateTo({
-					url: '../videoCall/videoCall?state=' + val + '&type=video' + '&room=' + room
-				});
-			}
+			// receiveVideo(val, room) { //Receiver
+			// 	uni.navigateTo({
+			// 		url: '../videoCall/videoCall?state=' + val + '&type=video' + '&room=' + room
+			// 	});
+			// }
 		},
 		mounted() {
 			// uni.onSocketMessage(function(res) {

--
Gitblit v1.9.3