funkyg / funkytunes

A streaming music player for Android, using torrents.
GNU General Public License v3.0
122 stars 24 forks source link

Start Playback before Song is fully Downloaded #2

Open funkyg opened 7 years ago

heyakyra commented 7 years ago

would code from https://github.com/mpv-android/mpv-android be useful?

or https://github.com/popcorn-official/popcorn-android

or https://code.videolan.org/videolan/vlc-android

funkyg commented 7 years ago

yes those seem useful

https://github.com/TorrentStream/TorrentStream-Android seems to be the library used by popcorntime android, so its probably the best option

heyakyra commented 7 years ago

also may be worth looking into torrenttunes:

https://github.com/dessalines/torrenttunes-android https://github.com/dessalines/torrenttunes-client

funkyg commented 7 years ago

just looked at the code for torrenttunes-android, doesnt look like it can play anything.

funkyg commented 7 years ago

i just noticed that jlibtorrent also has a sequential download mode. so we could just use that and start playback when the file reaches a certain percentage

http://www.libtorrent.org/reference-Core.html#set_sequential_download()

gjedeer commented 7 years ago

In this mode, piece priorities are ignored, with the exception of priority 7, which are still preferred over the sequential piece order.

Doesn't it mean it will also download files sequentially (track1, track2, track3, ...) ignoring what the user chose?

funkyg commented 7 years ago

no, pieces are parts of an individual file. so its independent from the file order

https://en.wikipedia.org/wiki/Torrent_file#Background