cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [3/4] cordova-plugin-media git commit: Make the output file of Android an acc file.
Date Tue, 21 Feb 2017 23:10:27 GMT
Make the output file of Android an acc file.

In order to play the audio file with the html <audio> tag in iOS:
1. change OutputFormat from RAW_AMR to AAC_ADTS
2. change OutputFormat from AMR_NB to AAC

Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/c6c59cc0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/c6c59cc0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/c6c59cc0

Branch: refs/heads/master
Commit: c6c59cc0a6ae44671fe69766c04e44ba18606239
Parents: 55d457b
Author: happy2discover <happy2discover@users.noreply.github.com>
Authored: Thu Jan 5 13:37:04 2017 +0800
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Tue Feb 21 14:58:07 2017 -0800

----------------------------------------------------------------------
 src/android/AudioPlayer.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/c6c59cc0/src/android/AudioPlayer.java
----------------------------------------------------------------------
diff --git a/src/android/AudioPlayer.java b/src/android/AudioPlayer.java
index 9d25a79..d46f4b4 100644
--- a/src/android/AudioPlayer.java
+++ b/src/android/AudioPlayer.java
@@ -151,8 +151,8 @@ public class AudioPlayer implements OnCompletionListener, OnPreparedListener,
On
             this.audioFile = file;
             this.recorder = new MediaRecorder();
             this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
-            this.recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR); // THREE_GPP);
-            this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); //AMR_NB);
+            this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS); // RAW_AMR);
+            this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); //AMR_NB);
             this.tempFile = generateTempFile();
             this.recorder.setOutputFile(this.tempFile);
             try {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message