java - Play several mp3 files with Jlayer -
i wrote app play mp3 files , have controls , rolling, problem each mp3 file played individually , have trigger play of new file.
i want know how can tell (pro grammatically) if player has finished playing file, can move on next one?
this thread code
@override public void run() { try { system.out.println(filename); fileinputstream fis = new fileinputstream(filename); bufferedinputstream bis = new bufferedinputstream(fis); player = new player(bis); player.play(); } catch (exception e) { system.out.println("problem playing file " + filename); system.out.println(e); } }
if not wrong looking for: player.iscomplete()
===> in context of jlayer api
while (!player.iscomplete()) { // // }
there go: http://www.javazoom.net/javalayer/docs/docs1.0/javazoom/jl/player/player.html#iscomplete%28%29
hope helps.
Comments
Post a Comment