JMC outside of a JavaFX context?

Q

Qu0ll

Does anyone know if the new Java Media Components (JMC) are usable outside a
JavaFX context such as in a Swing application? If not, will they be usable
in this way in Java 7 perhaps?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
(e-mail address removed)
[Replace the "SixFour" with numbers to email me]
 
M

Mark Space

Qu0ll said:
Does anyone know if the new Java Media Components (JMC) are usable
outside a JavaFX context such as in a Swing application? If not, will
they be usable in this way in Java 7 perhaps?


I found this on the web after about 90 seconds of searching:

import com.sun.media.jmc.JMediaPane;
import com.sun.media.jmc.Media;

private final JMediaPane mediaPane = new JMediaPane();

// Implement the following in a class.
public void open(File _file) throws AudioPlayerException
{
try
{
mediaPane.setSource(_file.toURI());
mediaMetaData = new Media(_file.toURI());
mediaPane.play();

}
catch (Exception _ex)
{
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top