android - Mediaplayer unable to play audio file in Cordova -
i using media plugin in cordova , trying download , play audio file using below code:
$http.get(url, {responsetype: 'arraybuffer'}).then(function(response) { requestfilesystem(filename, {create: true}, function gotfileentry(fileentry) { fileentry.createwriter(function gotfilewriter(writer) { writer.onwriteend = function() { var successcallback = onsuccess.bind(undefined, fileentry); var media = new media(filename, successcallback, successcallback); media.play(); }; writer.write(response.data); }, onerror); }, onerror) }, onerr
somehow 1 audio file(412553300.acc) working fine when play second 1 after downloading server not playing code have given error on console this:
e/mediaplayer: error (1, -2147483648)
i not getting either code have problem or file(394127925) not enough play using mediaplayer. have attached sample files: 412553300 , 394127925
i have recored these files using cordova media player , verified both files playing in vlc player. how file(394127925) not able play using above code. can me identify problem.
Comments
Post a Comment