10 Mar 2009

MediaUnsupportedException no more

Since the JavaFX's launch I had problems with media. At first JavaFX 1.0 on my home computer crashed JVM when trying to play anything. I filled a bug RT-2530, which was assigned and moved to appropriate category shortly after, but I've never heard from assignee anything. I guess it was because of amount of work in other areas and lack of votes for my bug. I went through intall-reinstall cycle of anything that came to my mind that could be related to media. One thing I wasn't intending to do was reinstalling Windows - I hate it as a solution and I didn't believe it is a cure for all bad. Anyway, I checked my friend's computer that have almost the same hardware as mine. That system didn't play media either. Nothing helped.

With JavaFX 1.0.1 things got slightly better - playing media with JavaFX gave me MediaUnsupportedException. So I went to JavaFX's JIRA and tried to find any bugs related to media and gave some of them, which I thought were similar to mine, a vote. At least I showed Sun's people there is a problem. Unfortunetly I was of a few that voted in JavaFX's JIRA at all. Maybe it is Sun's bug parade bad fame to be pleaded guilty for it?

Then after JavaFX 1.1 I searched again, because it still couldn't play video/audio with JavaFX. Flash worked fine and so did Silverlight. One day someone pointed me to release notes for JavaFX SDK stating that problems with built-in audio cards and missing audio drivers might cuase MediaUnsupportedException. Doh! I reinstalled DirectX (even tried to downgrade it), installed-reinstalled-tweaked codecs, installed On2 Flix encoder to check whether my machine can play fxm files, but I didn't updated my audio drivers! My mobo is nforce2 based with Realtek chip responsible for sound. I've installed new drivers for my built-in audio card. Rebooted and voila. I can now enjoy full power of JavaFX.

I have to say there is still a lot of work for JavaFX to be done, to make it competent rival of Flash and Silverlight, but it is a great start. I've started JavaFX course at javapassion.com and I like JavaFX Script. I also was astonished by video puzzle example from javafx.com. Is it possible to make similar app in Flash or Sliverlight (sorry I don't have time to digg through search engine results)? Anyway, as I said JavaFX has a long way ahead to go to really fly or shine - look at comparison to other RIA technologies at shinedraw.com to see discussion what it might do better in future to please its users. In comments I tried to respond to Terence problems with JavaFX (I almost fully agree with his points), but the conversation has gone the other way due deployment problems. In short Terence decided to wait for next releases to get deeper into JavaFX. I won't wait. I go and see what else JavaFX has for me. And what can I do to make it better.

Update: It seems I misread release notes title - it is for JavaFX preview release, even if itsn't relevant anymore it still inspired me to try to update my audio drivers.

No comments:

Post a Comment