public void play(int index)
{
try
{
player=Manager.createPlayer(songLocation.elementAt(index).toString());
player.addPlayerListener(this);
player.realize();
player.prefetch();
player.start();
Alert alert=new Alert("Player");
alert.setString("Player started");
Display.getDisplay(midlet).setCurrent(alert);
}
catch (Exception e) {
Alert alert=new Alert("Player");
alert.setString(e.getMessage().toString());
Display.getDisplay(midlet).setCurrent(alert);
}
}
public void playerUpdate(Player arg0, String arg1, Object arg2) {
int index=0;
if(arg1==END_OF_MEDIA)
{
index++;
if(index<songLocation.size())
play(index);
}
}
}
hi Righht now iam downlaoding a song and playing in streaming only i used one player .
as for my client requierement i need to use to 2 player one for downlaoding and other for playing can any one guide for this above code

Reply With Quote

