@Override public synchronized void reset() { if (bufferTask != null) { bufferTask.cancel(); } try { mediaPlayer.reset(); setPlayerState(IDLE); } catch (Exception x) { handleError(x); } }
private synchronized void bufferAndPlay() { reset(); bufferTask = new BufferTask(currentPlaying, 0); bufferTask.start(); }