commit 21/05/2025
This commit is contained in:
@@ -899,43 +899,35 @@ public class CaptureView {
|
|||||||
TextAreaSetText(medicalRecordID,""+medrecid);
|
TextAreaSetText(medicalRecordID,""+medrecid);
|
||||||
TextAreaSetText(PatientName, pr.name);
|
TextAreaSetText(PatientName, pr.name);
|
||||||
|
|
||||||
if (audioTimeline!=null) audioTimeline.play();
|
// harusnya ganti ke Timeline, tapi belum tested
|
||||||
|
//if (audioTimeline!=null) audioTimeline.play();
|
||||||
if (audioPlayer!=null && audioPlayer.isInited()){
|
|
||||||
if (!Objects.equals(audioPlayer.getCurrentFile(),audio_posisikan_muka)) {
|
|
||||||
if (!anti_bawel.get()){
|
|
||||||
audioPlayer.StopCurrentPlayback();
|
|
||||||
Wait(500);
|
|
||||||
audioPlayer.PlayFile(audio_posisikan_muka, new PlaybackStatus() {
|
|
||||||
@Override
|
|
||||||
public void onPlaybackStarted(String filename) {
|
|
||||||
anti_bawel.set(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPlaybackFinished(String filename) {
|
|
||||||
anti_bawel.set(false);
|
|
||||||
Thread antibawel = new Thread(()->{
|
|
||||||
try {
|
|
||||||
Thread.sleep(15*1000);
|
|
||||||
} catch (InterruptedException ignored) {
|
|
||||||
}
|
|
||||||
anti_bawel.set(false);
|
|
||||||
});
|
|
||||||
antibawel.setName("anti bawel");
|
|
||||||
antibawel.setDaemon(true);
|
|
||||||
antibawel.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPlaybackFailure(String filename) {
|
|
||||||
anti_bawel.set(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (anti_bawel.get()) return;
|
||||||
|
PlayFileWithEvent(audio_posisikan_muka, new PlaybackStatus() {
|
||||||
|
@Override
|
||||||
|
public void onPlaybackStarted(String filename) {
|
||||||
|
anti_bawel.set(true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public void onPlaybackFinished(String filename) {
|
||||||
|
Thread antibawel = new Thread(()->{
|
||||||
|
try {
|
||||||
|
Thread.sleep(15*1000);
|
||||||
|
} catch (InterruptedException ignored) {
|
||||||
|
}
|
||||||
|
anti_bawel.set(false);
|
||||||
|
});
|
||||||
|
antibawel.setName("anti bawel");
|
||||||
|
antibawel.setDaemon(true);
|
||||||
|
antibawel.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlaybackFailure(String filename) {
|
||||||
|
anti_bawel.set(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user