Browse Source

feature/v4socket

gemercheung 3 years ago
parent
commit
be75367ff8
1 changed files with 11 additions and 3 deletions
  1. 11 3
      socket.js

+ 11 - 3
socket.js

@@ -571,21 +571,29 @@ export default {
         roomMaximum: true
       })
     });
-    //被动通知开关MIC
+    //被动通知开关MIC 要2秒后
     socket.on('serverOnMic', ({
       voiceStatus
     }) => {
       setTimeout(() => {
         if (Number(voiceStatus) === 2) {
+          // wx.showToast({
+          //   title: '开MIC',
+          //   icon:'none'
+          // })
     
           this.openMic();
         }
         if (Number(voiceStatus) === 0) {
-       
+          // wx.showToast({
+          //   title: '关MIC',
+          //   icon:'none'
+          // })
+    
           this.closeMic();
         }
 
-      }, 1000)
+      }, 2000)
     })
 
     this.socketStop = () => {