コード例 #1
0
 private void playAudio() {
   if (this.prepareAudio()) {
     int position = index * (int) (1000 / video.getFps());
     this.audioPlayer.seekTo(position);
     this.audioPlayer.start();
   }
 }
コード例 #2
0
 private void initPlayer() {
   TimerTask imageLoadTask = new ImageLoadTask();
   TimerTask playTask = new PlayTask();
   this.playTimer = new Timer("Video player", true);
   this.playTimer.schedule(imageLoadTask, 0, 1);
   this.playTimer.scheduleAtFixedRate(playTask, 0, (long) (1000 / video.getFps()));
 }