cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Clelland (JIRA)" <>
Subject [jira] [Commented] (CB-6152) MediaFile Not Compatible with new File Plugin
Date Mon, 31 Mar 2014 14:51:17 GMT


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:
>             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

View raw message