Beispiel #1
0
 @GuiCallback("play_time")
 public void updateTime(Widget w, FrameEvent event) {
   MediaInstance mi = player.getPlayingMedia();
   TextBox.get(w).content = mi == null ? "" : Media.getPlayingTime(mi.getPlayTime());
 }
Beispiel #2
0
 @GuiCallback("progress")
 public void updateProgress(Widget w, FrameEvent event) {
   MediaInstance mi = player.getPlayingMedia();
   ProgressBar.get(w).progress = mi == null ? 0.0 : (double) mi.getPlayTime() / mi.media.length;
 }