You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ian Clelland (JIRA)" <ji...@apache.org> on 2014/03/31 16:51:17 UTC
[jira] [Commented] (CB-6152) MediaFile Not Compatible with new File
Plugin
[ https://issues.apache.org/jira/browse/CB-6152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13955254#comment-13955254 ]
Ian Clelland commented on CB-6152:
----------------------------------
MediaFile objects are actually subclassed from File objects, not FileEntry objects. As such, they would probably never have a {{.toURL}} (or {{.toNativeURL}}) method. It's a Cordova-specific API quirk that they even have a {{fullPath}} attribute like FileEntry objects do.
They should, though, have a {{localURL}} attribute, which could be used in its place, as File objects do now (though this is not yet part of any documented interface).
It would be a fairly big backwards-incompatible change to remove the {{fullPath}} attribute, or to change it to something that couldn't be used as a {{<video>>}} src attribute. I'm inclined to not touch {{fullPath}}, but to add {{localURL}}, which would be a {{file:///}} or {{cdvfile://}} URL (whichever is more appropriate) that could be saved and passed later to {{window.resolveLocalFileSystemURL}}.
> MediaFile Not Compatible with new File Plugin
> ---------------------------------------------
>
> Key: CB-6152
> URL: https://issues.apache.org/jira/browse/CB-6152
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File, Plugin File Transfer, Plugin Media Capture
> Reporter: Matthew Keable
> Assignee: Ian Clelland
>
> The latest release of the File and File Transfer plugins (1.0.0 & 0.4.1 respectively) now use the cdvfile:// protocol to reference files.
> The Media Capture plugin (0.2.7) does not offer the new toURL() method for the returned MediaFile objects.
--
This message was sent by Atlassian JIRA
(v6.2#6252)