Kingbob
Apr 15 2003, 06:29 AM
anyone know the coding for opening a mpeg in a java file
or
anyone know code for opening media player to play the vid?
Mandark
Apr 15 2003, 08:03 AM
http://www.javaworld.com/javaworld/jw-04-1.../jw-04-jmf.html
CODE
Player myPlayer = Manager.createPlayer(myURL);
public synchronized void blockingRealize() {
myPlayer.realize();
while (!realized) {
try {
wait();
} catch (java.lang.InterruptedException e) {
status.setText("Interrupted while waiting on realize...exiting.");
System.exit(1);
}
}
}
public synchronized void controllerUpdate (ControllerEvent event) {
if (event instanceof RealizeCompleteEvent) {
realized = true;
notify();
} else if (event instanceof EndOfMediaEvent) {
eomReached = true;
}
}