diff --git a/src/main/java/musicplayer/Player.java b/src/main/java/musicplayer/Player.java index d371005..256a75a 100644 --- a/src/main/java/musicplayer/Player.java +++ b/src/main/java/musicplayer/Player.java @@ -73,7 +73,7 @@ class Player { playBin.play(); thread.start(); while (true) { - if (playBin.isPlaying()) break; + if (playBin.queryDuration().getNanoSeconds() > 0) break; } // Wait for song to actually be playing otherwise queryDuration is always zero callbackInterface.setSeekBarDuration((int) playBin.queryDuration().toSeconds()); }