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

"cordova-plugin-media" 2.3.0 can not use "record" behavior in iOS 9.3.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • None
    • None
    • cordova-plugin-media
    • Cordova-android 5.1.1
      Cordova-iOS 4.1.1
      cordova-plugin-camera 2.3.0
      cordova-plugin-wkwebview-engine 1.0.3
      ipad mini iOS 9.3.2

    Description

      =====
      if(navigator.userAgent.match(/iPad|iPhone|iPod/i))
      {
      var extension = ".wav";
      }
      if(navigator.userAgent.match(/Android/i))
      {
      var extension = ".amr";
      }

      src = 'test' + extension;
      mediaRecord = new Media(src, onSuccess, onError);

      function onError(error)
      {
      navigator.notification.alert("error code:" + error.code + "\n" + "error messages:" + error.message, null, null);
      }
      =====

      in Android,it will trigger the "onSuccess" callback
      but in iOS 9.3.2,it will trigger the onError callback and output these debug message

      =====
      error code:1
      error messages:cannot use audio file from resource 'test.wav'
      ===

      any wrong with my code ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            bau720123 Colin Bau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: