[
https://issues.apache.org/jira/browse/CB-12742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
jcesarmobile updated CB-12742:
------------------------------
Priority: Major (was: Critical)
> Could not record audio at 'documents://beer.m4a'
> ------------------------------------------------
>
> Key: CB-12742
> URL: https://issues.apache.org/jira/browse/CB-12742
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Media
> Environment: iOS 10.2.1 (14D27)
> Cordova: 6.5.0
> Reporter: Paedly
>
> {code:javascript}
> var voiceMessage;
> function recordVoiceMessage() {
> // tested direct file:// path, without folder and with documents://
> voiceMessage = new Media(
> 'documents://test.m4a',
> function() { },
> function() {
> alert('SUCCESS');
> },
> function(error) {
> alert(JSON.stringify(error));
> }
> );
> voiceMessage.startRecord();
> }
> function stopRecordVoiceMessage() {
> voiceMessage.stopRecord();
> voiceMessage.release();
> var speechmemeUri = 'test.m4a';
> this.file.readAsText(LocalFileSystem.TEMPORARY,
> speechmemeUri).then(function(res) {
> alert('OK: ' + JSON.stringify(res));
> }, function(err) { alert('ERR: ' + JSON.stringify(err)); });
> this.file.readAsDataURL(LocalFileSystem.PERSISTENT,
> speechmemeUri).then(function(res) {
> alert('OK: ' + JSON.stringify(res));
> }, function(err) { alert(JSON.stringify(err)); });
> }
> {code}
> This is the script I tested with.
> If I want to record I get this messages.
> 1. Cannot use audio file from resource 'test.m4a'
> 2. Could not record audio at 'test.m4a'
> **And**
> 1. Cannot use audio file from resource
> 'file:///private/var/mobile/Containers/Data/Application/7381F546-C6A9-444F-A49A-CCAFFAF5B7A0/tmp/test.m4a'
> 2. Could not record audio at
> 'file:///private/var/mobile/Containers/Data/Application/7381F546-C6A9-444F-A49A-CCAFFAF5B7A0/tmp/test.m4a'
> **And**
> 1. Cannot use audio file from resource 'documents://test.m4a'
> 2. Could not record audio at 'documents://test.m4a'
> The question is why?
> Must I enable something special that cordova / ionic is able to write to the
> storage of the device?
> Or whats wrong with this?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]