se-bastiaan / TorrentStream-Android

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

Sample with working seekbar #71

Closed phanijsp closed 3 years ago

phanijsp commented 3 years ago

Hi, Can you please provide a sample with working seekbar

se-bastiaan commented 3 years ago

I'm not sure what you question is. A seekbar? This is not a video player library.

phanijsp commented 3 years ago

My bad. I've got it working. Thanks for the the library

maxakash commented 2 years ago

My bad. I've got it working. Thanks for the the library Hey @phanijsp Can you please share the code?

phanijsp commented 2 years ago

@maxakash I have used exoplayer video library for that. I have used this demo for starters https://github.com/google/ExoPlayer/blob/release-v2/demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java

You can get the file uri from Torrent and pass it on to video payer.

maxakash commented 2 years ago

I can play the video once the file is downloaded. I was asking whether you were able to play the video file while it was downloading?

phanijsp commented 2 years ago

@maxakash Yes you can. In onStreamReady you'll get the torrent. From that torrent you can get the video file and feed it to the player. You can refer to the below sample. https://github.com/TorrentStream/TorrentStream-Android/blob/develop/sample/src/main/java/com/github/se_bastiaan/torrentstreamer/sample/MainActivity.kt