[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637227#comment-16637227 ] ASF GitHub Bot commented on CB-13774: - janpio commented on issue #164: CB-13774: repair broken recording and playback functionality on Android URL: https://github.com/apache/cordova-plugin-media/pull/164#issuecomment-426719933 Closing and re-opening to trigger a new CI/test run with new PR merge. 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: us...@infra.apache.org > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637228#comment-16637228 ] ASF GitHub Bot commented on CB-13774: - janpio closed pull request #164: CB-13774: repair broken recording and playback functionality on Android URL: https://github.com/apache/cordova-plugin-media/pull/164 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/AudioPlayer.java b/src/android/AudioPlayer.java index 861421e7..40b12378 100644 --- a/src/android/AudioPlayer.java +++ b/src/android/AudioPlayer.java @@ -151,8 +151,8 @@ public void startRecording(String file) { this.audioFile = file; this.recorder = new MediaRecorder(); this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); - 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(); this.recorder.setOutputFile(this.tempFile); 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: us...@infra.apache.org > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637230#comment-16637230 ] ASF GitHub Bot commented on CB-13774: - carcus88 opened a new pull request #164: CB-13774: repair broken recording and playback functionality on Android URL: https://github.com/apache/cordova-plugin-media/pull/164 Revert back to plugins original use of DEFAULT as the audio encode and decoder. ### Platforms affected Android ### What does this PR do? Puts the media encoder/decoder back to DEFAULT ### What testing has been done on this change? I created a repo that shows the current media plugin failing. Applying the code in this pull request will show it passing. https://github.com/medsurvey/cordova-media-bug 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. ### Checklist *Could not complete these as I don't have access* - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. - [] Added automated test coverage as appropriate for this change. 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: us...@infra.apache.org > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16634037#comment-16634037 ] ASF GitHub Bot commented on CB-13774: - janpio commented on issue #164: CB-13774: repair broken recording and playback functionality on Android URL: https://github.com/apache/cordova-plugin-media/pull/164#issuecomment-425912074 Hey, I just fixed the problem that caused Android tests to fail in `master`. Could you rebase this PR please? This should get rid of the Android failures and possibly fix all test failures for this PR. 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: us...@infra.apache.org > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16607641#comment-16607641 ] Jan Piotrowski (Sujan) commented on CB-13774: - Both the issue and PR description describe what code is broken, but not what actual functionality. >From what you wrote it seems to be "record something, then play it back >immediately". So I have to assume using `media.startRecord`, then `media.stopRecord` and then `media.play` would fail. Correct? > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16607453#comment-16607453 ] Mark Mitchell commented on CB-13774: [~Sujan12] what is broken is described in the issue description. The title is just a summary. The steps to reproduce are broken down in the pull request [https://github.com/apache/cordova-plugin-media/pull/164] The use case would be making a simple app to record audio and play it back in iOS and Android. The problem is the default settings allow for recording but not for playback. The pull request puts this back to "DEFAULT" for both platforms so a developer who did not specify settings would still get something that works out of the box. > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16607249#comment-16607249 ] Jan Piotrowski (Sujan) commented on CB-13774: - What exactly is the problem and what is broken? > cordova-plugin-media broken recording and playback functionality does not really explain which steps do not work or which use case is broken. This would be really helpful to know. > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16519912#comment-16519912 ] Ken Naito commented on CB-13774: Thanks Mark. I could reproduce this issue by using Android 4.4 / 5.0. Indeed, the https://github.com/apache/cordova-plugin-media/pull/164 can resolve this issue. However I think DEFAULT encoding/format is low quality and may not be played in iOS devices. I think it is better that the developer can choose Encoder and/or OutputFormat by his own settings. > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16476334#comment-16476334 ] Mark Mitchell commented on CB-13774: The AVD I was testing with was a Pixel C API level 21 using Android 5.0 as well as various real devices that where all having the same issue. > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16475583#comment-16475583 ] Kenichi Naito commented on CB-13774: What device and android os version did you use? I tried to test with Nexus 5 and Android 6.0.1. In my case, the Encoding AAC and Format AAC_ADTS works. Further the above PR ([https://github.com/apache/cordova-plugin-media/pull/164] ) fails because the WEB_MP3_STREAM ([http://c22033-l.i.core.cdn.streamfarm.net/22033mdr/live/3087mdr_figaro/ch_classic_128.mp3)] no longer exists. > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13774) cordova-plugin-media broken recording and playback functionality
[ https://issues.apache.org/jira/browse/CB-13774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322651#comment-16322651 ] ASF GitHub Bot commented on CB-13774: - carcus88 opened a new pull request #164: Fix for CB-13774 URL: https://github.com/apache/cordova-plugin-media/pull/164 Revert back to plugins original use of DEFAULT as the audio encode and decoder. ### Platforms affected Android ### What does this PR do? Puts the media encoder/decoder back to DEFAULT ### What testing has been done on this change? I created a repo that shows the current media plugin failing. Applying the code in this pull request will show it passing. https://github.com/medsurvey/cordova-media-bug 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. ### Checklist *Could not complete these as I don't have access* - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. - [] Added automated test coverage as appropriate for this change. 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: us...@infra.apache.org > cordova-plugin-media broken recording and playback functionality > - > > Key: CB-13774 > URL: https://issues.apache.org/jira/browse/CB-13774 > 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 (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org