sandeep paliwal created CB-5914:
-----------------------------------
Summary: Media API - play API does not work when played just after
recording
Key: CB-5914
URL: https://issues.apache.org/jira/browse/CB-5914
Project: Apache Cordova
Issue Type: Bug
Components: Android, CordovaJS
Affects Versions: 3.3.0
Environment: Cordova 3.3 on Android / HTC One device
Reporter: sandeep paliwal
Priority: Minor
On Android, recording to a media file and then directly playing doesn't work.
Internally in logs I see NPE being thrown.
Code -
function recordAudio()
{
var src = "test.mp3";
mediaRec = new Media(src, onSuccess, onError);
// Record audio
mediaRec.startRecord();
// Stop recording after 10 sec
var recTime = 0;
var recInterval = setInterval(function() {
recTime = recTime + 1;
if (recTime >= 10) {
clearInterval(recInterval);
mediaRec.stopRecord();
alert("done recording...trying to play now");
mediaRec.play(); //this will not work
console.log("requested play");
}
}, 1000);
}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)