Hi,
I have come across some Java code that opens movies using JMF. I have noticed that the program filters the string containing the url so that all spaces are transformed into "%20" before feeding the url string to the MediaLocator:
(...)
String url = encodeURL("file://"+path);
MediaLocator ml= new MediaLocator(url))
(...)
}
public String encodeURL(String url) {
int index = 0;
while (index>-1) {
index = url.indexOf(' ');
if (index>-1)
url = url.substring(0,index)+"%20"+url.substring(index+1,url.length());
}
return url;
}
(...)
Opening a movie from a path that contains spaces with jmf.jar works fine. However, opening it with fobs gives the typical error such as when the movie file has not been located. Note that if the raw url is used (that is, without calling encodeURL) fobs works fine.
If the "%20" convention is standard (I don't know..) then I think the fobs parser should know about it.
Cheers,
Jordi.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yeah... teh %20 is the representation of a hex character in a URL. It seems that the patch implemented by christian was not enough. As I already said, we should take a look at the way JMStudio manages URLs. Fobs doesn't actually support URLs, but only filename. Try to change %20 by a espace in the string. This should do the trick. Anyway, I take not and will definately take care of this issue in the next release.
Thanks for your report!!
Cheers.
Jos San Pedro Wandelmer
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have come across some Java code that opens movies using JMF. I have noticed that the program filters the string containing the url so that all spaces are transformed into "%20" before feeding the url string to the MediaLocator:
(...)
String url = encodeURL("file://"+path);
MediaLocator ml= new MediaLocator(url))
(...)
}
public String encodeURL(String url) {
int index = 0;
while (index>-1) {
index = url.indexOf(' ');
if (index>-1)
url = url.substring(0,index)+"%20"+url.substring(index+1,url.length());
}
return url;
}
(...)
Opening a movie from a path that contains spaces with jmf.jar works fine. However, opening it with fobs gives the typical error such as when the movie file has not been located. Note that if the raw url is used (that is, without calling encodeURL) fobs works fine.
If the "%20" convention is standard (I don't know..) then I think the fobs parser should know about it.
Cheers,
Jordi.
Hi jordi,
yeah... teh %20 is the representation of a hex character in a URL. It seems that the patch implemented by christian was not enough. As I already said, we should take a look at the way JMStudio manages URLs. Fobs doesn't actually support URLs, but only filename. Try to change %20 by a espace in the string. This should do the trick. Anyway, I take not and will definately take care of this issue in the next release.
Thanks for your report!!
Cheers.
Jos San Pedro Wandelmer