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

MediaError object missing message member

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • None
    • cordova-plugin-media
    • Building on OSX 10.11.5, Android 5.1.1 and 5.2.0

    Description

      on iOS, the MediaError object contains both the error code and the message. On Android, the object is missing the message.

      new Media(this.src,
          // success callback
          successCallback,
          // error callback
          function(err) {
              console.log("recordAudio():Audio Error Code: "+ err.code + ", "+ err.message, err);
              if(app.file){
                  app.file.release();
                  app.file = null;
                  // app.stop();
              }
          }
      

      outputs: recordAudio():Audio Error Code: 0, undefined

      I have seen both error code 0 and error code 1, the former of which is not documented. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html#mediaerror

      Attachments

        Activity

          People

            erisu Bryan Ellis
            juneku Madison Dickson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: