@GuiCallback("play_time") public void updateTime(Widget w, FrameEvent event) { MediaInstance mi = player.getPlayingMedia(); TextBox.get(w).content = mi == null ? "" : Media.getPlayingTime(mi.getPlayTime()); }
@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; }