JavaFX Media issues

John Smith John_Smith at symantec.com
Thu Aug 8 14:07:29 PDT 2013


> One thing to suggest is that you can install your own URL content handlers / protocols in Java.

That won't help in this case unless you replaced the http, file or jar protocol handlers, which would be weird.
"Only HTTP, FILE, and JAR URLs are supported."
http://docs.oracle.com/javafx/2/api/javafx/scene/media/Media.html#Media%28java.lang.String%29

-----Original Message-----
From: openjfx-dev-bounces at openjdk.java.net [mailto:openjfx-dev-bounces at openjdk.java.net] On Behalf Of Richard Bair
Sent: Thursday, August 08, 2013 1:57 PM
To: Felix Bembrick
Cc: openjfx-dev at openjdk.java.net List
Subject: Re: JavaFX Media issues

> I am having a look at JavaFX media support and have a couple of questions:
> 
> 1. It seems that the only way to load media files is by specifying a 
> source such as a file path etc.  This is not going to work well for me 
> as all of my application's content (which includes data, digital 
> assets, media etc.) is stored in a database on the server and is loaded through an IO stream.
> Why doesn't Media support loading of files through a stream?  That 
> would seem like a common use case to me!

I will have to let the media guys chime in, I don't know why we don't support a stream. At one time Image had the same limitation but we added stream support for it, so it might just be oversight. One thing to suggest is that you can install your own URL content handlers / protocols in Java. So if your URL said "myapp://nameofvideo.mov" or whatever, you can install a "myapp" protocol handler with Java which is responsible for creating the InputStream. This way you can still had us a url and we can get back your input stream, even from a custom source such as a Database.

> 2. I am unable to locate any reference to JavaFX Media in the JavaDocs 
> for JDK 8 which I found here:
> 
> http://download.java.net/jdk8/jfxdocs/index.html
> 
> Is this just a glitch?

Probably got blown up during the gradle switch. Can you please file a bug (in the "build" component)

> 3. Is buffering of media something planned for the future in JavaFX?
> 
> 4. What about live streaming of media content?

Kirill should have more information here.

Thanks!
Richard


More information about the openjfx-dev mailing list