Thursday, February 16, 2012

Will JavaFX support Camera (and Microphone) with a developer friendly API?

With all the props that go to the upcoming release of JavaFX 2.x I tried to find out the status of the media components in JavaFX.
Looking at other platforms first:
- Flash: Camera / Microphone: See really extended support, at least Adobe claims they support it on all devices (although of course there might be always slight glitches if you use some exotic webcam on Linux). They pretty much can support any DESKTOP device. And that is what makes you wonder: What about mobile platform? They just cancelled further development of Flash Mobile ( see: ).
- Silverlight: Camera / Microphone access was introduced in Silverlight 4, however I honestly can't say how widespreaded the support on devices accross platforms is, as I hardly know any application that use Silverlight on Mac or even Linux to capture Cam/Mic. However there are noticeable offerings of VOD providers (Maxdome in Germany for example) that use the Silverlight platform as it seems to have a good integration of DRM tools ( see: ). However the programming model is still shaped for .NET and Microsoft simply can't expect that every Web-Programmer now becomes a .NET programmer.
- HTML5: There is the Video component in HTML5, and its the only cross-platform video-playback that works on mobile devices as well as on desktop (although the playback lacks on many features) . However the access to camera and microphone is in very early stages and it is not clear at all if one day browser vendors will agree on a codec for the transmission of the captured data from the device.

Now looking at JavaFX:
They build some playback components to playback video. Additionally the JavaFX API ( ) has a Camera object, however it seems to have nothing to do with a "webcam", it is an internal object used to render the UI. There is also no Microphone access. The plan seems to be like leaving this as opportunity to the users to program their own drivers to access the cam/mic. By looking at the way JMF was not developed since almost 10 years and all the negative feedback (or even "ANTI" (or counter-revolutionary) projects like FMJ ( ) I doubt that this is an opportunity lot of people will consider.

Btw: You can also participate in the discussion in the Jira issue at the JavaFX bugtracker: Vote for it! :)