Integrated VLC media player in android application.When for the first time the activity get opened ,trying to seek the video time for 10 sec. The code is as below
var mediaObject = Media(mLibVLC, videoUrl)
videoPlayer.media = mediaObject
videoPlayer.play()
videoPlayer.setTime(10000,true)
debug("===>isSeekable "+videoPlayer.isSeekable)
Logcat ===>isSeekable false
Now i can see from the log cat that the video is not seekable, so the seeking is not working for the initial video, but when play the next video, isSeekable is true from next time onward.
How to change this behaviour.
Note: implementation "org.videolan.android:libvlc-all:3.4.2" using this version of vlc
I suspect that the video isn't yet playing.
Either set it playing, allowing a fraction of a second for it to fire-up and then
seekor use theMediaoption and then use a form ofMedia.add_option('start-time='+restart_time).Seek only works if the video is already playing.
Edit:
Any pause should be after the
videoPlayer.play()restart_timewould be a string in seconds e.g. start_time=10.5See the vlc command line
--start-time=83.4https://wiki.videolan.org/VLC_HowTo/Jump_to_a_certain_time/Also as
mfklpoints out some media isn't seekableNote: I work in python so you may have to translate to whatever Android is using, I've no clue.