realizes the function of the MP3 player
Simple implementation of the function of the MP3 player, meet the comparison is not good, speak
Check it out.
Main functions:
1. Display the file list, mainly referring to a predecessor's code, thanks.
2. You can implement playback start, pause.
3. File filtering
Java Code Collection Code
Return f.isdirectory () | | F.getname (). EndsWith
(". mp3");
In fact, there are a lot of things to achieve:
1. Progress bar.
2. Press the key to enter the next song.
3. Beautify yourself.
==============================
Main code:
Call the MP3 file and play it
Java Code Collection Code
MediaPlayer MP = new MediaPlayer ();
try {
Mp.setdatasource (Mp3file.getpath ());
Mp.setaudiostreamtype
(Audiosystem.stream_music);
Mp.prepare ();
Mp.start ();
} catch (IOException e) {
}
What's the rest of it?
More good stuff in here. Programmers must SEE: http://itlanbao.com/preview.aspx#1,0
realizes the function of the MP3 player