Skip to content

Commit

Permalink
fix(ios): determine captured audio type from file instead of hardcode…
Browse files Browse the repository at this point in the history
…d value

Previously forced "audio/wav" but not always correct: from file can be "audio/x-wav" or other.
  • Loading branch information
ath0mas committed Oct 19, 2020
1 parent 181f2fd commit 8716074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ios/CDVCapture.m
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ - (void)audioRecorderDidFinishRecording:(AVAudioRecorder*)recorder successfully:
if (flag) {
NSString* filePath = [avRecorder.url path];
// NSLog(@"filePath: %@", filePath);
NSDictionary* fileDict = [captureCommand getMediaDictionaryFromPath:filePath ofType:@"audio/wav"];
NSDictionary* fileDict = [captureCommand getMediaDictionaryFromPath:filePath ofType:nil];
NSArray* fileArray = [NSArray arrayWithObject:fileDict];

self.pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:fileArray];
Expand Down

0 comments on commit 8716074

Please sign in to comment.