I am trying to launch my my code and start the player. But I can not do that.
import javax.media.*;
import java.io.*;
public class MP3Player {
public static void main(String[] args) throws Exception {
File file = new File("c://player/trigger.mpg");
MediaLocator mrl = new MediaLocator(file.toURL());
Player player = Manager.createPlayer(mrl);
player.start();
}
}
[Edit by Philipp] According to a comment by the original author, Netbeans prints the following error message:
Unable to handle format: MPEG, 160x120, FrameRate=30.0, Length=28800 Failed to realize:
com.sun.media.PlaybackEngine@131f71a Error: Unable to realize
com.sun.media.PlaybackEngine@131f71a BUILD SUCCESSFUL (total time: 1 second)
[/Edit by Philipp]