[
https://issues.apache.org/jira/browse/CB-5914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joe Bowser updated CB-5914:
---------------------------
Labels: Android (was: )
Component/s: (was: CordovaJS)
(was: Android)
Plugin Media
> 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: Plugin Media
> Affects Versions: 3.3.0
> Environment: Cordova 3.3 on Android / HTC One device
> Reporter: sandeep paliwal
> Priority: Minor
> Labels: Android
>
> 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.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]