Skip to content

Commit 3e9d278

Browse files
author
qinhui
committed
Fix audio self-rendering issue.
1 parent 3cfbd67 commit 3e9d278

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

iOS/APIExample-OC/APIExample-OC/Examples/Advanced/CustomAudioRender/CustomAudioRender.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)