Example #1
0
 @FXML
 void seek(MouseEvent evt) {
   if (player != null) {
     Duration d = player.getMedia().getDuration();
     double millis = (evt.getX() / loadProgressBar.getWidth()) * d.toMillis();
     Duration s = new Duration(millis);
     player.seek(s);
   }
 }
Example #2
0
 @FXML
 public void tracksViewMouseClicked(MouseEvent evt) {
   if (evt.getClickCount() == 2) {
     playSelectedTrack();
   }
 }