cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omefire <>
Subject [GitHub] cordova-plugin-media pull request: CB-10723: iOS audio should use ...
Date Wed, 09 Mar 2016 19:59:15 GMT
Github user omefire commented on a diff in the pull request:
    --- 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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message