Ver código fonte

fix. ios native type cast

matrixbirds 5 anos atrás
pai
commit
c168788137
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      ios/RCTAgora/RCTAgora.m

+ 3
- 3
ios/RCTAgora/RCTAgora.m Ver arquivo

@@ -851,7 +851,7 @@ RCT_EXPORT_METHOD(setLocalVoiceReverb:(NSInteger)reverb value:(NSInteger)value
851 851
 RCT_EXPORT_METHOD(startAudioMixing:(NSDictionary *) options
852 852
                   resolve:(RCTPromiseResolveBlock)resolve
853 853
                   reject:(RCTPromiseRejectBlock)reject) {
854
-  NSInteger res = [self.rtcEngine startAudioMixing:[options[@"filepath"] stringValue]
854
+  NSInteger res = [self.rtcEngine startAudioMixing:[options[@"filepath"]]
855 855
                                           loopback:[options[@"loopback"] boolValue]
856 856
                                            replace:[options[@"replace"] boolValue]
857 857
                                              cycle:[options[@"cycle"] integerValue]];
@@ -1038,7 +1038,7 @@ RCT_EXPORT_METHOD(playEffect
1038 1038
                   resolve:(RCTPromiseResolveBlock)resolve
1039 1039
                   reject:(RCTPromiseRejectBlock)reject) {
1040 1040
   NSInteger res = [self.rtcEngine playEffect:(int)[options[@"soundid"] integerValue]
1041
-                                    filePath:[options[@"filepath"] stringValue]
1041
+                                    filePath:[options[@"filepath"]]
1042 1042
                                    loopCount:(int)[options[@"loopcount"] integerValue]
1043 1043
                                        pitch:[options[@"pitch"] doubleValue]
1044 1044
                                          pan:[options[@"pan"] doubleValue]
@@ -1157,7 +1157,7 @@ RCT_EXPORT_METHOD(startAudioRecording:(NSDictionary *)options
1157 1157
                   resolve:(RCTPromiseResolveBlock)resolve
1158 1158
                   reject:(RCTPromiseRejectBlock)reject) {
1159 1159
   AgoraAudioRecordingQuality qualityType = (AgoraAudioRecordingQuality)[options[@"quality"] integerValue];
1160
-  NSInteger res = [self.rtcEngine startAudioRecording:[options[@"filepath"] stringValue] quality:qualityType];
1160
+  NSInteger res = [self.rtcEngine startAudioRecording:[options[@"filepath"]] quality:qualityType];
1161 1161
   if (res == 0) {
1162 1162
     resolve(nil);
1163 1163
   } else {