295296297298299300301302303304305
mediaPlayer.setRate(rate); mediaPlayer.setOnEndOfMedia(new Runnable() { @Override public void run() { synchronized (mediaPlayer) { mediaPlayer.notifyAll(); } } }); mediaPlayer.play(); try {