Github user omefire commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-media/pull/85#discussion_r55579371
  
    --- Diff: src/ios/CDVSound.m ---
    @@ -216,14 +216,14 @@ - (void)create:(CDVInvokedUrlCommand*)command
         NSString* mediaId = [command argumentAtIndex:0];
         NSString* resourcePath = [command argumentAtIndex:1];
     
    -    CDVAudioFile* audioFile = [self audioFileForResource:resourcePath 
withId:mediaId doValidation:NO forRecording:NO];
    +    CDVAudioFile* audioFile = [self audioFileForResource:resourcePath 
withId:mediaId doValidation:YES forRecording:NO];
     
         if (audioFile == nil) {
             NSString* errorMessage = [NSString stringWithFormat:@"Failed to 
initialize Media file with path %@", resourcePath];
             NSString* jsString = [NSString 
stringWithFormat:@"%@(\"%@\",%d,%@);", 
@"cordova.require('cordova-plugin-media.Media').onStatus", mediaId, 
MEDIA_ERROR, [self createMediaErrorWithCode:MEDIA_ERR_ABORTED 
message:errorMessage]];
             [self.commandDelegate evalJs:jsString];
         } else {
    -        NSURL* resourceUrl = [[NSURL alloc] initWithString:resourcePath];
    +        NSURL* resourceUrl = audioFile.resourceURL;
    --- End diff --
    
    Isn't ```audioFile.resourceURL``` going to always be nil ? (since we are 
skipping validation in ```audioFileForResource(...)```, which is where we set 
the resourceURL). 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to