public final class MediaResourceLocator extends Object
This is needed since local files must be played differently to non-local MRLs like streaming URLs or "screen://".
This is essentially an internal class.
Modifier and Type | Method and Description |
---|---|
static String |
encodeMrl(String mrl)
Encode, if needed, a local file MRL that may contain Unicode characters as a file URL with
"percent" encoding.
|
static boolean |
isLocation(String mrl)
Does the MRL represent a "location"?
|
public static boolean isLocation(String mrl)
mrl
- media resource locatortrue
if the supplied MRL should be treated as a "location"; false
for a filepublic static String encodeMrl(String mrl)
This method deals only with the special case of an MRL for a local file name containing Unicode characters. Such MRLs must be encoded as file URLs, by adding a "file://" prefix before percent-encoding the filename.
Without this, vlc will not be able to play the file since it is using native API that can not handle unencoded Unicode characters.
This method does not deal with any MRLs that are URLs since Unicode characters are forbidden by specification for any URL.
What this means in practical terms is that if an MRL is specified that contains a "scheme" like "http", or "file" then that MRL will not be encoded by this method, even if it contains Unicode characters. This situation, if it arises, is considered a client application vaildation failure.
mrl
- MRLCopyright © 2009–2015 Caprica Software Limited. All rights reserved.