You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Madison Dickson (JIRA)" <ji...@apache.org> on 2016/07/28 21:49:20 UTC

[jira] [Updated] (CB-11641) MediaError object missing message member

     [ https://issues.apache.org/jira/browse/CB-11641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Madison Dickson updated CB-11641:
---------------------------------
    Description: 
on iOS, the MediaError object contains both the error code and the message. On Android, the object is missing the message.

{code}
new Media(this.src,
    // success callback
    successCallback,
    // error callback
    function(err) {
        console.log("recordAudio():Audio Error Code: "+ err.code + ", "+ err.message, err);
        if(app.file){
            app.file.release();
            app.file = null;
            // app.stop();
        }
    }
{code}

outputs: {{recordAudio():Audio Error Code: 0, undefined}}

I have seen both error code 0 and error code 1, the former of which is not documented. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html#mediaerror

  was:
on iOS, the MediaError object contains both the error code and the message. On Android, the object is missing the message.

{code}
new Media(this.src,
    // success callback
    successCallback,
    // error callback
    function(err) {
        console.log("recordAudio():Audio Error Code: "+ err.code + ", "+ err.message, err);
        if(app.file){
            app.file.release();
            app.file = null;
            // app.stop();
        }
    }
{code}

outputs: {{recordAudio():Audio Error Code: 0, undefined}}


> MediaError object missing message member
> ----------------------------------------
>
>                 Key: CB-11641
>                 URL: https://issues.apache.org/jira/browse/CB-11641
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media
>    Affects Versions: 2.3.0
>         Environment: Building on OSX 10.11.5, Android 5.1.1 and 5.2.0
>            Reporter: Madison Dickson
>            Priority: Minor
>
> on iOS, the MediaError object contains both the error code and the message. On Android, the object is missing the message.
> {code}
> new Media(this.src,
>     // success callback
>     successCallback,
>     // error callback
>     function(err) {
>         console.log("recordAudio():Audio Error Code: "+ err.code + ", "+ err.message, err);
>         if(app.file){
>             app.file.release();
>             app.file = null;
>             // app.stop();
>         }
>     }
> {code}
> outputs: {{recordAudio():Audio Error Code: 0, undefined}}
> I have seen both error code 0 and error code 1, the former of which is not documented. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html#mediaerror



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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