@Override public void onJump(GSMovie m) { if (timeSlider != null) { timeSlider.setVisible(true); timeSlider.setValue(m.time()); } }
@Override public void onNewFrame(GSMovie m) { if (!stopSliderAdvance && m != null && timeSlider != null) { timeSlider.setValue(m.time()); } updateTimeInfo(m); }
private void updateTimeInfo(GSMovie m) { int totalElapsedSeconds = (int) m.time(); int se = totalElapsedSeconds % 60; totalElapsedSeconds -= se; int totalElapsedMin = totalElapsedSeconds / 60; int me = totalElapsedMin % 60; totalElapsedMin -= me; int totalElapsedHours = totalElapsedMin / 60; int he = totalElapsedHours; totalElapsedSeconds = (int) movieView.getDuration(); int sd = totalElapsedSeconds % 60; totalElapsedSeconds -= sd; totalElapsedMin = totalElapsedSeconds / 60; int md = totalElapsedMin % 60; totalElapsedMin -= md; totalElapsedHours = totalElapsedMin / 60; int hd = totalElapsedHours; displayTime(getTimeString(he, me, se, hd, md, sd)); }