コード例 #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());
 }
コード例 #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;
 }