Browse Source

更新XRRGBCamera

胡佳骏 1 year ago
parent
commit
086255542e

+ 9 - 0
Assets/GHZScritps/AgoraRTCManager.cs

@@ -356,7 +356,16 @@ public class AgoraRTCManager : SingletonMono<AgoraRTCManager>
 
     public void MuteLocalVideoStream(bool isVideo)
     {
+        if(isVideo)
+        {
+            XRRGBCamera.Instance.playCamera();
+
+        }
+        else
+        {
 
+            XRRGBCamera.Instance.stopCamera();
+        }
         int msg = RtcEngine.MuteLocalVideoStream(!isVideo);
         //RtcEngine.EnableVideo();
         //int msg = RtcEngine.EnableLocalVideo(isVideo);

+ 0 - 2
Assets/Studio/Scripts/PlayerView/PlayerViewComponent.cs

@@ -216,7 +216,6 @@ namespace ShadowStudio.Model
         {
             if (_peer.IsSlef)
             {
-                XRRGBCamera.Instance.playCamera();
                 AgoraRTCManager.Instance.MuteLocalVideoStream(true);
             }
             else
@@ -229,7 +228,6 @@ namespace ShadowStudio.Model
 
             if (_peer.IsSlef)
             {
-                XRRGBCamera.Instance.stopCamera();
                 AgoraRTCManager.Instance.MuteLocalVideoStream(false);
             }
             else

+ 2 - 0
Assets/Studio/_4ShowScene/UserListFunctionModule/Scripts/ItemUserView.cs

@@ -185,6 +185,7 @@ public class ItemUserView : MonoBehaviour
     {
         if (_peer.IsSlef)
         {
+            XRRGBCamera.Instance.playCamera();
             AgoraRTCManager.Instance.MuteLocalVideoStream(true);
         }
         else
@@ -197,6 +198,7 @@ public class ItemUserView : MonoBehaviour
 
         if (_peer.IsSlef)
         {
+            XRRGBCamera.Instance.stopCamera();
             AgoraRTCManager.Instance.MuteLocalVideoStream(false);
         }
         else