瀏覽代碼

RTC 逻辑修改

DGJ 2 年之前
父節點
當前提交
52af2d86f7

二進制
.vs/MRSpace_RhionXTest/v16/.suo


+ 5 - 32
Assets/GHZAlter/Agora/AgoraVideoAudioManager.cs

@@ -220,6 +220,7 @@ public class AgoraVideoAudioManager : SingletonMono<AgoraVideoAudioManager>
         //list_ShowView = new Dictionary<string, RawImage>();
         AgoraVideoAudioManager.Instance.listCustomPeer.Clear();
         AgoraVideoAudioManager.Instance.listCustomPeer = new List<CustomPeer>();
+
     }
 
     public void VuforiaLeaveChannel()
@@ -252,7 +253,7 @@ public class AgoraVideoAudioManager : SingletonMono<AgoraVideoAudioManager>
         Debug.Log(" RemAtPeeridUid " + peerid + "   " + dicPeeridAndUid[peerid]);
         dicPeeridAndUid.Remove(peerid);
 
-        CloseAgoraMainImage(peerid, false);
+     
 
         for (int i = 0; i < listCustomPeer.Count; i++)
         {
@@ -262,12 +263,6 @@ public class AgoraVideoAudioManager : SingletonMono<AgoraVideoAudioManager>
        
     }
 
-    private void CloseAgoraMainImage(string peerid, bool isOpen)
-    {
-        //if (peerid == mainViewPeerId)
-        //    RoomMain.Instance.agoraRawImage.gameObject.SetActive(isOpen);
-    }
-
     //public void RemAtListShowView(string peerId)
     //{
     //    if (list_ShowView.ContainsKey(peerId))
@@ -313,12 +308,7 @@ public class AgoraVideoAudioManager : SingletonMono<AgoraVideoAudioManager>
 
     public void EnableLoacalAudio( bool isAudio)
     {
-        if (isAudio)
-            StudioRtc.Instance.me.cIdA = "Audio";
-
-        int msg = RtcEngine.MuteLocalAudioStream(!isAudio);
-
-      //  int msg = RtcEngine.EnableLocalAudio(isAudio);
+        int msg = RtcEngine.EnableLocalAudio(isAudio);
         switch (msg)
         {
             case 0:
@@ -466,12 +456,12 @@ public class AgoraVideoAudioManager : SingletonMono<AgoraVideoAudioManager>
                     case REMOTE_VIDEO_STATE_REASON.REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED://远端用户停止发送视频流或远端用户禁用视频模块。
 
                         listCustomPeer[i].isVideo = false;
-                        CloseAgoraMainImage(listCustomPeer[i].peerId, false);
+                       
                         break;
                     case REMOTE_VIDEO_STATE_REASON.REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED://远端用户恢复发送视频流或远端用户启用视频模块。
 
                         listCustomPeer[i].isVideo = true;
-                        CloseAgoraMainImage(listCustomPeer[i].peerId, true);
+                       
                         break;
                     case REMOTE_VIDEO_STATE_REASON.REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE: //远端用户离开频道。
 
@@ -500,24 +490,7 @@ public class AgoraVideoAudioManager : SingletonMono<AgoraVideoAudioManager>
 
     public void RemoteAudioStateChanged(uint uid, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_STATE_REASON reason)
     {
-      //  Debug.Log(listCustomPeer.Count);
         Debug.Log("RemoteAudioStateChanged   " + uid);
-        //if (!dicPeeridAndUid.ContainsValue(uid))
-        //    return;
-        //   Debug.Log("RemoteAudioStateChanged   " + 1);
-        //string peerid = "";
-        //foreach (var item in dicPeeridAndUid)
-        //{
-        //    Debug.Log(item.Key + "     " + item.Value);
-        //    if (item.Value == uid)
-        //        peerid = item.Key;
-        //}
-
-        //for (int i = 0; i < listCustomPeer.Count; i++)
-        //{
-        //    Debug.Log(listCustomPeer[i].peerId);
-        //    Debug.Log(listCustomPeer[i].name);
-        //}
 
         for (int i = 0; i < listCustomPeer.Count; i++)
         {

+ 1 - 1
Assets/StreamingAssets/build_info

@@ -1 +1 @@
-Build from SK-20211220VCWK at 2023/5/18 11:57:25
+Build from SK-20211220VCWK at 2023/5/24 9:52:55

+ 6 - 1
Assets/Studio/Scenes/Logo/Logo.unity

@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 0}
-  m_IndirectSpecularColor: {r: 0.857776, g: 0.89812523, b: 0.99094766, a: 1}
+  m_IndirectSpecularColor: {r: 0.70642865, g: 0.7837076, b: 0.97953075, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
@@ -1996,6 +1996,11 @@ PrefabInstance:
       propertyPath: m_CullingMask.m_Bits
       value: 55
       objectReference: {fileID: 0}
+    - target: {fileID: 4181028404793140011, guid: 7cd0ceba7525bdc42a36be841a8aad16,
+        type: 3}
+      propertyPath: m_IsActive
+      value: 1
+      objectReference: {fileID: 0}
     - target: {fileID: 5121918160867592627, guid: 7cd0ceba7525bdc42a36be841a8aad16,
         type: 3}
       propertyPath: m_CullingMask.m_Bits

+ 3 - 10
Assets/Studio/Scripts/PlayerView/PlayerViewComponent.cs

@@ -402,16 +402,9 @@ namespace ShadowStudio.Model
                     StudioRtc.Instance.closeRev(cPeer.cIdA);
                     cPeer.isCloseAudio = true;
                     //  cPeer.setInfo("audio", cPeer.cIdA, false);
-                    AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(peerid, true);
-                }
-                if(cPeer!=null)
-                {
-                    pauseCerAudio.SetActive(false);
-                    pauseAudio.SetActive(true);
-                    cPeer.isCloseAudio = true;
-                    //  cPeer.setInfo("audio", cPeer.cIdA, false);
-                  //  AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(peerid, true);
+                   // AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(peerid, true);
                 }
+     
                 AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(cPeer.name, false);
             }
         }
@@ -434,7 +427,7 @@ namespace ShadowStudio.Model
                     StudioRtc.Instance.startRev(cPeer.cIdA);
                     cPeer.isCloseAudio = false;
                     // cPeer.setInfo("audio", cPeer.cIdA,true);
-                    AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(peerid, false);
+                   // AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(peerid, false);
                 }
                 if (cPeer != null)
                 {

+ 3 - 3
Assets/Studio/XRLib/Codes/TestMVC/LoginDlg.cs

@@ -178,14 +178,14 @@ namespace ShadowStudio.UI
         }
         private void OnClickLogin()
         {
-            //userInputField.text = "HBKC217147";
+            //userInputField.text = "HBKC21714 7";
             //passwordInputField.text = "HBKC217147";
 
             //userInputField.text = "nokia0001";
             //passwordInputField.text = "a88888888";
 
-            userInputField.text = "ghz0007";
-            passwordInputField.text = "123456Aa";
+            //userInputField.text = "ghz0008";
+            //passwordInputField.text = "123456Aa";
 
             if (userInputField.text == "" || passwordInputField.text == "")
             {

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

@@ -393,6 +393,7 @@ public class ItemUserView : MonoBehaviour
 
               //  cPeer.setInfo("audio", cPeer.cIdA, false);
             }
+            Debug.Log("closeMic" + cPeer.name);
             AgoraVideoAudioManager.Instance.MuteRemoteAudioStream(cPeer.name, false);
         }
     }

+ 4 - 8
ProjectSettings/ProjectSettings.asset

@@ -147,11 +147,7 @@ PlayerSettings:
     16:9: 1
     Others: 1
   bundleVersion: 10.13.3
-  preloadedAssets:
-  - {fileID: 11400000, guid: 15bc390d88375eb448a370cd84b9a24d, type: 2}
-  - {fileID: 11400000, guid: eaaad242393318e4f85c45e69c8837f0, type: 2}
-  - {fileID: -6682207197718421661, guid: 8f422df2931cba0478c1fe8ab232b9a3, type: 2}
-  - {fileID: 3493090336618791480, guid: 2d049ae1db0e2b74c8251022ae6dcb95, type: 2}
+  preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1
@@ -927,7 +923,7 @@ PlayerSettings:
   metroSplashScreenUseBackgroundColor: 1
   platformCapabilities:
     WindowsStoreApps:
-      CodeGeneration: False
+      EnterpriseAuthentication: False
       OfflineMapsManagement: False
       HumanInterfaceDevice: False
       Location: False
@@ -960,10 +956,10 @@ PlayerSettings:
       PointOfService: False
       RecordedCallsFolder: False
       Contacts: False
-      Proximity: False
       InternetClient: True
+      CodeGeneration: False
       BackgroundMediaPlayback: False
-      EnterpriseAuthentication: False
+      Proximity: False
   metroTargetDeviceFamilies:
     Desktop: False
     Holographic: False

+ 5 - 2
ProjectSettings/QualitySettings.asset

@@ -201,7 +201,7 @@ QualitySettings:
     skinWeights: 4
     textureQuality: 0
     anisotropicTextures: 2
-    antiAliasing: 2
+    antiAliasing: 4
     softParticles: 1
     softVegetation: 1
     realtimeReflectionProbes: 1
@@ -222,4 +222,7 @@ QualitySettings:
     resolutionScalingFixedDPIFactor: 1
     customRenderPipeline: {fileID: 0}
     excludedTargetPlatforms: []
-  m_PerPlatformDefaultQuality: {}
+  m_PerPlatformDefaultQuality:
+    Android: 2
+    Server: 0
+    Standalone: 5

+ 1 - 1
ProjectSettings/RenderStreamingProjectSettings.asset

@@ -13,4 +13,4 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_WizardPopupAtStart: 1
-  m_WizardPopupAlreadyShownOnce: 1
+  m_WizardPopupAlreadyShownOnce: 0