cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paedly (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12742) Could not record audio at 'documents://beer.m4a'
Date Mon, 01 May 2017 10:15:04 GMT

    [ https://issues.apache.org/jira/browse/CB-12742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15990709#comment-15990709
] 

Paedly commented on CB-12742:
-----------------------------

Ok it seems that if I create the file with File plugin first, I can use it with Plugin Media.
I will find out more :-)

But it absolutly makes no sense that I must create the file manually if I want to use them
in Plugin Media for recording = create.

> 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
>            Priority: Critical
>
> {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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message