Skip to main content

ANSWERED: What media types are supported?

2 replies [Last post]
coffeejolts
Offline
Joined: 2007-05-17
Points: 0

I downloaded the latest build of the technology preview, and am trying to use the media classes. However, I keep getting an Unsupported media exception every time I try to load a file. I've tried mp3, wma, and wav- no luck. Which media types are supported?

Here is the test frame I created...

<br />
import javafx.application.*;<br />
import javafx.scene.layout.*;<br />
import javafx.scene.media.*;<br />
Frame{<br />
    width: 200<br />
    height: 200<br />
    content:<br />
    MediaView{<br />
        mediaPlayer:<br />
        MediaPlayer{<br />
            media:<br />
            Media{<br />
                source: "file:/C:/test1.mp3"<br />
            }<br />
            autoPlay: true<br />
        }</p>
<p>    }            </p>
<p>    visible: true<br />
}<br />

Message was edited by: coffeejolts

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
orre
Offline
Joined: 2008-07-08
Points: 0

I have tested: avi, mov, mpg, mp3, ogg and wmv. Nothing works right now. However it will be cool when it does.

javafx.application.Frame does not have content attribute any more it has stage:

import javafx.application.*;
import javafx.scene.layout.*;
import javafx.scene.media.*;
Frame{
width: 200
height: 200
stage:
Stage{
content:
MediaView{
mediaPlayer:
MediaPlayer{
media:
Media{
source: "file:/C:/test1.wmv"
}
autoPlay: true
}
}
}
visible: true
}

Message was edited by: orre

Message was edited by: orre

coffeejolts
Offline
Joined: 2007-05-17
Points: 0

So, I made a little webstart application to answer my question. Currently, there are NO working media formats, but you can use the application I made to find out which formats will be available in the future.

http://coffeejolts.com/site/2008/07/java-media-little-by-little.html