How to code in Java (with Java Media Framework): When the player reaches a certain time playing a video clip (for example, reaching 3.124 minutes in reproduction time), it generates an event?
Asked
Active
Viewed 423 times
1 Answers
1
The JMF Player
implements Clock
which in turn provides methods like:
setStopTime(Time)
. Add a listener to the player and listen for the stop event.getMediaNanoseconds()
. Start a SwingTimer
to repeat every NN milliseconds. Check the media time. If it is beyond the time of interest, stop the timer & player.

Andrew Thompson
- 168,117
- 40
- 217
- 433