@@ -15,7 +15,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
1515 : (RCTPromiseRejectBlock)reject) {
1616 NSInteger result = [self .audioDeviceModule startPlayout ];
1717 if (result == 0 ) {
18- resolve (@{ @" success " : @ YES } );
18+ resolve (nil );
1919 } else {
2020 reject (@" playout_error" , [NSString stringWithFormat: @" Failed to start playout: %ld " , (long )result], nil );
2121 }
@@ -26,7 +26,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
2626 : (RCTPromiseRejectBlock)reject) {
2727 NSInteger result = [self .audioDeviceModule stopPlayout ];
2828 if (result == 0 ) {
29- resolve (@{ @" success " : @ YES } );
29+ resolve (nil );
3030 } else {
3131 reject (@" playout_error" , [NSString stringWithFormat: @" Failed to stop playout: %ld " , (long )result], nil );
3232 }
@@ -37,7 +37,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
3737 : (RCTPromiseRejectBlock)reject) {
3838 NSInteger result = [self .audioDeviceModule startRecording ];
3939 if (result == 0 ) {
40- resolve (@{ @" success " : @ YES } );
40+ resolve (nil );
4141 } else {
4242 reject (@" recording_error" , [NSString stringWithFormat: @" Failed to start recording: %ld " , (long )result], nil );
4343 }
@@ -48,7 +48,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
4848 : (RCTPromiseRejectBlock)reject) {
4949 NSInteger result = [self .audioDeviceModule stopRecording ];
5050 if (result == 0 ) {
51- resolve (@{ @" success " : @ YES } );
51+ resolve (nil );
5252 } else {
5353 reject (@" recording_error" , [NSString stringWithFormat: @" Failed to stop recording: %ld " , (long )result], nil );
5454 }
@@ -59,7 +59,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
5959 : (RCTPromiseRejectBlock)reject) {
6060 NSInteger result = [self .audioDeviceModule initAndStartRecording ];
6161 if (result == 0 ) {
62- resolve (@{ @" success " : @ YES } );
62+ resolve (nil );
6363 } else {
6464 reject (
6565 @" recording_error" , [NSString stringWithFormat: @" Failed to start local recording: %ld " , (long )result], nil );
@@ -71,7 +71,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
7171 : (RCTPromiseRejectBlock)reject) {
7272 NSInteger result = [self .audioDeviceModule stopRecording ];
7373 if (result == 0 ) {
74- resolve (@{ @" success " : @ YES } );
74+ resolve (nil );
7575 } else {
7676 reject (
7777 @" recording_error" , [NSString stringWithFormat: @" Failed to stop local recording: %ld " , (long )result], nil );
@@ -86,7 +86,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
8686 : (RCTPromiseRejectBlock)reject) {
8787 NSInteger result = [self .audioDeviceModule setMicrophoneMuted: muted];
8888 if (result == 0 ) {
89- resolve (@{ @" success " : @ YES , @" muted " : @(muted)} );
89+ resolve (nil );
9090 } else {
9191 reject (@" mute_error" , [NSString stringWithFormat: @" Failed to set microphone mute: %ld " , (long )result], nil );
9292 }
@@ -104,7 +104,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
104104 : (RCTPromiseRejectBlock)reject) {
105105 NSInteger result = [self .audioDeviceModule setVoiceProcessingEnabled: enabled];
106106 if (result == 0 ) {
107- resolve (@{ @" success " : @ YES , @" enabled " : @(enabled)} );
107+ resolve (nil );
108108 } else {
109109 reject (@" voice_processing_error" ,
110110 [NSString stringWithFormat: @" Failed to set voice processing: %ld " , (long )result],
@@ -127,7 +127,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
127127
128128RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (audioDeviceModuleSetVoiceProcessingAGCEnabled : (BOOL )enabled) {
129129 self.audioDeviceModule .voiceProcessingAGCEnabled = enabled;
130- return @{ @" success " : @ YES , @" enabled " : @(enabled)} ;
130+ return nil ;
131131}
132132
133133RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (audioDeviceModuleIsVoiceProcessingAGCEnabled) {
@@ -156,7 +156,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
156156 : (RCTPromiseRejectBlock)reject) {
157157 NSInteger result = [self .audioDeviceModule setMuteMode: (RTCAudioEngineMuteMode)mode];
158158 if (result == 0 ) {
159- resolve (@{ @" success " : @ YES , @" mode " : @(mode)} );
159+ resolve (nil );
160160 } else {
161161 reject (@" mute_mode_error" , [NSString stringWithFormat: @" Failed to set mute mode: %ld " , (long )result], nil );
162162 }
@@ -168,7 +168,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
168168
169169RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (audioDeviceModuleSetAdvancedDuckingEnabled : (BOOL )enabled) {
170170 self.audioDeviceModule .advancedDuckingEnabled = enabled;
171- return @{ @" success " : @ YES , @" enabled " : @(enabled)} ;
171+ return nil ;
172172}
173173
174174RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (audioDeviceModuleIsAdvancedDuckingEnabled) {
@@ -177,7 +177,7 @@ @implementation WebRTCModule (RTCAudioDeviceModule)
177177
178178RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (audioDeviceModuleSetDuckingLevel : (NSInteger )level) {
179179 self.audioDeviceModule .duckingLevel = level;
180- return @{ @" success " : @ YES , @" level " : @(level)} ;
180+ return nil ;
181181}
182182
183183RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD (audioDeviceModuleGetDuckingLevel) {
0 commit comments