2

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);
}
khr055
  • 28,690
  • 16
  • 36
  • 48
Safareli
  • 842
  • 10
  • 18

2 Answers2

1

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

Community
  • 1
  • 1
Marc Van Daele
  • 2,856
  • 1
  • 26
  • 52
0

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.

Community
  • 1
  • 1
Peter Tran
  • 1,626
  • 1
  • 17
  • 26