public boolean playPause() {
		if (player == null) return false;

		Status status = player.getStatus();

		if (status == Status.UNKNOWN  || status == Status.HALTED) {
			// don't do anything in these states
			pending = true;
			return false;
		}

		if (status == Status.PAUSED || status == Status.READY || status == Status.STOPPED) {
			// rewind the song if we're sitting at the end
			if (atEndOfMedia) {
				player.seek(player.getStartTime());
				atEndOfMedia = false;
			}
			player.play();
		} 
		else {
			player.pause();
		}
		return true;
	}