@@ -32,7 +32,7 @@ public class AgoraClientManager : MonoBehaviour
3232 public bool useToken = false ;
3333 public Toggle loopbackAudioToggle , newScreenShareToggle ;
3434 public VirtualBackgroundSource myVirtualBackground ;
35-
35+
3636 private List < uint > remoteClientIDs ;
3737
3838 public int blurDegrees = 2 ;
@@ -49,7 +49,7 @@ void Start()
4949 }
5050
5151 InitEngine ( ) ;
52-
52+
5353 //channel setup.
5454
5555 newScreenShareToggle . isOn = useNewScreenShare ;
@@ -85,15 +85,18 @@ void Update()
8585
8686 useScreenShareAudio = loopbackAudioToggle . isOn ;
8787
88- muteLocalVideoText . text = localVideoMuted ? "Unmute Local Video" : "Mute Local Video" ;
89- muteRemoteVideoText . text = remoteVideoMuted ? "Unmute Remote Video" : "Mute Remote Video" ;
90- muteLocalAudioText . text = localAudioMuted ? "Unmute Local Audio" : "Mute Local Audio" ;
91- muteRemoteAudioText . text = remoteAudioMuted ? "Unmute Remote Audio" : "Mute Remote Audio" ;
88+ // muteLocalVideoText.text = localVideoMuted ? "Unmute Local Video" : "Mute Local Video";
89+ // muteRemoteVideoText.text = remoteVideoMuted ? "Unmute Remote Video" : "Mute Remote Video";
90+ // muteLocalAudioText.text = localAudioMuted ? "Unmute Local Audio" : "Mute Local Audio";
91+ // muteRemoteAudioText.text = remoteAudioMuted ? "Unmute Remote Audio" : "Mute Remote Audio";
9292
93- if ( joinedChannel ) {
93+ if ( joinedChannel )
94+ {
9495 joinButton . interactable = false ;
9596 leaveButton . interactable = true ;
96- } else {
97+ }
98+ else
99+ {
97100 joinButton . interactable = true ;
98101 leaveButton . interactable = false ;
99102 }
@@ -106,7 +109,7 @@ bool CheckAppId()
106109 return ( APP_ID . Length > 10 ) ;
107110 }
108111
109-
112+
110113
111114 //for muting/unmuting local video through IRtcEngine class.
112115 public void setLocalMuteVideo ( )
@@ -181,31 +184,39 @@ void InitEngine()
181184
182185 }
183186
184- public void enableVirtualBackground ( ) {
185- mRtcEngine . enableVirtualBackground ( true , myVirtualBackground ) ;
187+ public void enableVirtualBackground ( bool onoff )
188+ {
189+ mRtcEngine . enableVirtualBackground ( onoff , myVirtualBackground ) ;
186190 }
187191
188- public void setVirtualBackgroundBlur ( ) {
192+ public void setVirtualBackgroundBlur ( )
193+ {
189194 mRtcEngine . SetVirtualBackgroundBlur ( blurDegrees ) ;
190195 }
191196
192- public void setVirtualBackgroundColor ( ) {
197+ public void setVirtualBackgroundColor ( )
198+ {
193199 mRtcEngine . SetVirtualBackgroundColor ( hexColor ) ;
194200 }
195201
196- public void setVirtualBackgroundImage ( ) {
202+ public void setVirtualBackgroundImage ( )
203+ {
197204 mRtcEngine . SetVirtualBackgroundImage ( imgFile ) ;
198205 }
199206
200- public void setVirtualBackgroundVideo ( ) {
207+ public void setVirtualBackgroundVideo ( )
208+ {
201209 mRtcEngine . SetVirtualBackgroundVideo ( videoFile ) ;
202210 }
203211
204212 public void JoinChannel ( )
205213 {
206- if ( ! useToken ) {
214+ if ( ! useToken )
215+ {
207216 mRtcEngine . JoinChannel ( TOKEN_1 , CHANNEL_NAME_1 , "" , 0 , new ChannelMediaOptions ( true , true , true , true ) ) ;
208- } else {
217+ }
218+ else
219+ {
209220 TokenClient . Instance . RtcEngine = mRtcEngine ;
210221 TokenClient . Instance . GetTokens ( CHANNEL_NAME_1 , 0 , ( token , rtm ) =>
211222 {
@@ -234,7 +245,7 @@ void OnApplicationQuit()
234245 }
235246 }
236247
237- void userVideoMutedHandler ( uint uid , bool muted )
248+ void userVideoMutedHandler ( uint uid , bool muted )
238249 {
239250 logger . UpdateLog ( string . Format ( "onUserMuteHandler uid: {0}, muted: {1}" , uid , muted ) ) ;
240251 }
0 commit comments