Package me.aurous.ui.panels

Examples of me.aurous.ui.panels.ControlPanel.seek()


    // player.play();

    player.setOnReady(() -> {
      player.setAutoPlay(false);
      panel.seek().setValue(0);
      if (sourceURL
          .contains("https://www.youtube.com/watch?v=kGubD7KG9FQ")) {
        player.pause();
      } else {
        player.play();
View Full Code Here


  private void updateTime(final long currentTime, final long totalDuration) {
    final ControlPanel panel = UISession.getControlPanel();
    final int percentage = (int) (((currentTime * 100.0) / totalDuration) + 0.5); // jesus
    final double seconds = currentTime / 1000.0;
    UISession.getControlPanel().seek().setValue(percentage);
    panel.seek().setValue(percentage);
    panel.current().setText(MediaUtils.calculateTime((int) seconds));

  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.