0

I'm streaming a video in ExoPlayer using Media3 while concurrently downloading it. This works well until I attempt to seek to an unbuffered position, causing it to hang. My aim is to let the user seek to any position, start downloading that particular segment, and then continue playback once buffering completes.

Currently, I'm using ProgressiveMediaSource with FileDataSource, but I'm struggling to retrieve the exact byte position when seeking. This would allow me to request the appropriate segment of the video for downloading based on the user's seek action.

I considered manually mapping seek positions to byte offsets. However, the complexity arises because different video formats have varying bitrates, making it challenging to correlate bytes with time durations.

How can I achieve this byte position retrieval as easier as possible (ideally just utilising ExoPlayer)?

Please note: solutions based on RTP, HTTP, RTSP, DASH etc. are not viable as the source isn't suitable for such protocols.

Arsenius
  • 4,972
  • 4
  • 26
  • 39

0 Answers0