Reputation: 880
I have problem seeking into live hls stream.
When I call getCurrentPosition on videoview it returns 40 000, but when I try to seekto(20000); nothing changes, no error no action.
so if anyone has any suggestions please help me.
here is an code example:
//video is playing live
seek = 20000;
if(_vPlayer.getCurrentPosition() > seek) {
_vPlayer.seekTo(seek);
}
Upvotes: 2
Views: 1420
Reputation: 2734
I guess that seek is not supported for HLS (see also http://developer.android.com/guide/appendix/media-formats.html) where they state that, for H-264 AVC, they support MPEG-TS (AAC audio only, not seekable, Android 3.0+)
When I try this stream on a Galaxay SII, the native player doesn't support seeking either.
See here for a better/more complete answer
Upvotes: 1
Reputation: 1679
Some suggestions: 1) Try implementing OnSeekCompleteListener to determine if the seek is actually completing successfully: VideoView not playing Video from desired position
2) Try pause, seekTo, start. Again, you'll probably need to implement OnSeekCompleteListener; or for testing purposed just sleep for a bit in between seekTo and start.
Upvotes: 0