|
|
@ -246,12 +246,10 @@ public class AudioSlidePlayer implements SensorEventListener {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public synchronized void seekTo(double progress) throws IOException {
|
|
|
|
public synchronized void seekTo(double progress) throws IOException {
|
|
|
|
if (mediaPlayer == null) return;
|
|
|
|
if (mediaPlayer == null || !isReady()) {
|
|
|
|
|
|
|
|
|
|
|
|
if (isReady()) {
|
|
|
|
|
|
|
|
mediaPlayer.seekTo((long) (mediaPlayer.getDuration() * progress));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
play(progress);
|
|
|
|
play(progress);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
mediaPlayer.seekTo((long) (mediaPlayer.getDuration() * progress));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|