/**
 * MP3 Player class
 * 
 * Code based on sample by Steven Haines
 * Original sample code:
 * http://www.informit.com/guides/content.aspx?g=java&seqNum=290
 * 
 * Uses JLayer 1.0 library for MP3 playback
 * http://www.javazoom.net/javalayer/sources.html
 * 
 * Modified by Philip Peng
 * Last updated: 2007/10/09
 * 
 */

// Imports
import javazoom.jl.player.*;
import java.io.*;

public class MP3PlayerThread extends Thread {
	
	public Player player;
	
	public MP3PlayerThread ( Player player ) {
		
		// Set up player
		try {
			this.player = player;
		} catch ( Exception e ) {
			e.printStackTrace();
		}
		
	}
	
	public void run() {
		
		// Play the stream
		try {
			player.play();
			
		} catch( Exception e ) {
			e.printStackTrace();
		}
	}

}
