Java/Development Class/MP3
Версия от 18:01, 31 мая 2010; (обсуждение)
Load mp3 file with MediaLocator
import javax.media.*;
import java.io.*;
public class MP3Player {
public static void main(String[] args) throws Exception {
File file = new File("test.mp3");
MediaLocator mrl = new MediaLocator(file.toURL());
Player player = Manager.createPlayer(mrl);
player.start();
}
}