cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
Date Wed, 03 Oct 2018 17:14:00 GMT


ASF GitHub Bot commented on CB-13774:

janpio closed pull request #164: CB-13774: repair broken recording and playback functionality
on Android

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/android/ b/src/android/
index 861421e7..40b12378 100644
--- a/src/android/
+++ b/src/android/
@@ -151,8 +151,8 @@ public void startRecording(String file) {
             this.audioFile = file;
             this.recorder = new MediaRecorder();
-            this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR);
-            this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB);
+            this.recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
+            this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
             this.tempFile = generateTempFile();
             try {


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> cordova-plugin-media broken recording and playback functionality 
> -----------------------------------------------------------------
>                 Key: CB-13774
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-media
>         Environment: Android
>            Reporter: Mark Mitchell
>            Priority: Blocker
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> The problem seems to be that somehow the encoder and decoder are set to different encoding
types and are not compatible. Additionally its assuming an encoder is available on the platform
and since the interface to the this object does not allow a way to specifying encoding I feel
like the default may have been more appropriate. 
> Currently the code is as follows 
> {code:java}
> this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR);
> this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB);
> {code}
> But trying to play back the recorded audio fails with a decoder error

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message