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

Audio breaks on some Android devices

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.2.16
    • Fix Version/s: None
    • Component/s: cordova-plugin-media
    • Labels:
    • Environment:

      Samsung GT-I8730 Galaxy Express, and Nvidia Shield Tablet

      Description

      Hi,

      My code is simple : every click triggers a sound play.
      ****
      url = "/android_asset/www/"+url;
      AUDIO_OBJECTS[url] = new Media( url,
      //success callback
      function ()

      { console.log("playAudio():Audio Success"); }

      ,
      //error callback
      function (err)

      { alert("playAudio():Audio Error code : " + err.code + " stringified : "+JSON.stringify(err)) }

      );
      AUDIO_OBJECTS[url].play();
      ****
      This works well ! Until a certain number of click, maybe 20. My sounds are various mp3, from 1 second length to 10.
      After about 20 clicks, the sound is not played anymore.
      I have to exit the app and come back, sometimes it works again, sometimes not.
      Also, sometimes it fires the error callback with error code "0" ...
      On my Nexus 9 (same code), it works well, audio never breaks, but sometimes it struggles a bit before the sound is correctly played.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pixcoder@gmail.com Pixcoder

              Dates

              • Created:
                Updated:

                Issue deployment