se-bastiaan / TorrentStream-Android

A torrent streamer library for Android based on libtorrent4j
Other
343 stars 108 forks source link

How to get buffer progress when setInterestedBytes(long bytes) is used? #72

Closed phanijsp closed 3 years ago

phanijsp commented 3 years ago

When a torrent is added to stream it gives buffer progress for the first time. How can we get the buffer progress when setInterestedBytes(long bytes) is used?. Once the stream starts to download(after buffering), buffer progress always sits at 100.

se-bastiaan commented 3 years ago

There is no buffer process when you use the interested bytes, the 'buffer' is basically the start of the download to get the first and last bytes of the video file so that you can start playback. If you want to know if the bytes were downloaded you can check using hasInterestedBytes or you can calculate the pieces yourself and check in an extra listener.