File tree Expand file tree Collapse file tree
iOS/APIExample-OC/APIExample-OC/Examples/Advanced/CustomAudioRender Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ - (void)viewDidLoad {
9494 NSString *channelName = [self .configs objectForKey: @" channelName" ];
9595 // enable video module and set up video encoding configs
9696 [self .agoraKit enableAudio ];
97-
97+ [self .agoraKit setAudioScenario: AgoraAudioScenarioGameStreaming];
98+
9899 // set up local video to render your local camera preview
99100 AgoraRtcVideoCanvas *videoCanvas = [[AgoraRtcVideoCanvas alloc ] init ];
100101 videoCanvas.uid = 0 ;
@@ -113,7 +114,7 @@ - (void)viewDidLoad {
113114 // when joining channel. The channel name and uid used to calculate
114115 // the token has to match the ones used for channel join
115116 AgoraRtcChannelMediaOptions *options = [[AgoraRtcChannelMediaOptions alloc ] init ];
116- options.publishMicrophoneTrack = NO ;
117+ options.publishMicrophoneTrack = YES ;
117118 options.publishCameraTrack = NO ;
118119 options.autoSubscribeAudio = YES ;
119120 options.autoSubscribeVideo = NO ;
You can’t perform that action at this time.
0 commit comments