I am "seeking" the ability to seek forward and backwards on a video being played under vlcj. Information found in the documentation for vlcj API apparently refers to methods that no longer exist.
Is there still a way to do a forward and reverse seek on a video being played by vlcj? If so, how is this done?
Edit to answer questions asked by Slaw below:
I am using VLCJ 4.7.3, with vlcj-javafx V1.1.0.
On the site: https://www.tabnine.com/code/java/methods/uk.co.caprica.vlcj.player.MediaPlayer/seek
there are several references to a seek() function provided by the MediaPlayer class. That function does not exist in the current vlcj.
On a tutorial provided by TutorialsPoint at:
there is a reference to a function called
mediaPlayer().controls().skipWhile();
which not only does not exist in the current vlcj that I am using, but is not actually used in the seek example program provided below the referance!
The way to seek with contemporary versions of vlcj is to use
skipTimeorskipPositionwith a positive or negative delta:Or:
If you want to seek to absolute times/positions:
Or (position between 0.0 and 1.0):
Note that tabnine and tutorialspoint are not the official or sanctioned documentation for vlcj, so if that's out of date that's an issue for them and not a problem with vlcj's documentation.
In fact,
skipWhilehas never been a vlcj API function.Instead, you should look here, or the GitHub project directly:
https://javadoc.io/doc/uk.co.caprica/vlcj/latest/uk/co/caprica/vlcj/player/base/MediaPlayer.html https://javadoc.io/doc/uk.co.caprica/vlcj/latest/uk/co/caprica/vlcj/player/base/ControlsApi.html