You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (Resolved) (JIRA)" <ji...@apache.org> on 2012/03/06 20:07:58 UTC

[jira] [Resolved] (CB-99) Normalize Media recording in PhoneGap

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

Shazron Abdullah resolved CB-99.
--------------------------------

    Resolution: Duplicate
    
> Normalize Media recording in PhoneGap
> -------------------------------------
>
>                 Key: CB-99
>                 URL: https://issues.apache.org/jira/browse/CB-99
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, iOS
>    Affects Versions: 0.9.5, 0.9.6, 1.0.0, 1.1.0
>            Reporter: Simon MacDonald
>            Assignee: Shazron Abdullah
>
> I am trying to record audio in Android and iOS with the following
> code:
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
> onFileSystemSuccess, onError);
> ...
> fileSystem.root.getFile(filename, function onSuccess(file)
> {...},onError) //create a FileEntry (onFileSystemSuccess handler)
> ...
> mediaObj = new Media(file, onSuccess, onError); //create MediaObject
> (in onSuccess handler)
> But it seems that there is a difference between Android and iOS. In
> Android I need to pass file.name and in iOS file.fullPath.
> So Android needs only the filename like "file.ext" and iOS needs a
> path like "/var/mobile/Applications/...HEX-APPID.../Documents/
> file.ext".
> On the other hand, when I use a FileTransfer, I have to provide
> file.toURI(), i.e. "file://localhost/var/mobile/Applications/...HEX-
> APPID.../Documents/file.ext".
> But in the documentation it is claimed that I need an "URI" for ALL
> cases, so why do I need file.toURI(), file.name or file.fullPath
> depending on OS and function? Am I missing something?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira