help with 'addMP3PlayerListener' ?
Status: Alpha
Brought to you by:
cristiansulea
Hi I need help with your library. I am trying to create an automatic radio station.I have code to create an random 1 hour long playlist. I can your player play my playlist. My problem is getting notification when the player has completed playing the playlist. When the player has finished playing I need to create a new playlist and play the new list. I think I must need to use 'addMP3PlayerListener' somehow, but I don't know how to figure that out(newbie). here is my current code -
private void startStationActionPerformed(java.awt.event.ActionEvent evt)
{
boolean isStopped = true;
while(isStopped)
{
int djID = getCurrentDjID();
DiskJockey dj = new DiskJockey();
songListing = SongOpenedController.getSongList(); ArrayList<Song> theCurrentDJsSongs = dj.getDjPlayList(songListing, djID); clearTable(); updateTable(theCurrentDJsSongs); MP3Player myPlayer = new MP3Player(); for (Song song : theCurrentDJsSongs) { myPlayer.addToPlayList(new File(song.getSongPathName())); } myPlayer.play(); isStopped = myPlayer.isStopped();
}// end while
}
Hello, Steve!
Any luck with a listener ?