Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11380

Media Plugin - IOS: Error when creating Media object with new file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0
    • None
    • cordova-plugin-media
    • iOS 9.3.1

    Description

      The line:

      var myMedia = new Media("documents://hello.wav",
         function() {
              console.log("success");
         },
         function(er) {
              console.log(er);
         }
      );
      

      results in the error "Cannot use audio file from resource 'documents:hello.wav'", when "hello.wav" does not exist. The created Media object is usable (I can record and play back), but the error means the constructor's success callback never gets called. Also happens with variations of the src URI using "file" and "cdvfile".

      This is caused by a change to the validation parameter from NO to YES in commit e5b663ac951b2d8cb2e5e470d2c7072aa56cf779 on March 2nd.

      Attachments

        Activity

          People

            alsorokin Alexander Sorokin
            jkeating John Keating
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: