sschueller / peertube-android

Thorium, a PeerTube Android Client
https://github.com/Chocobozzz/PeerTube
GNU Affero General Public License v3.0
341 stars 53 forks source link

Problems with webtorrent/torrent support currently in peertube and the roadmap #255

Closed dhk2 closed 3 years ago

dhk2 commented 3 years ago

Especially given the double storage poblem and HLS live streams, moving forward Thorium will be compatible with fewer instances. The best solution I can come up with is using the JavaScript client in a webview. That will allow p2p functionality with HLS or WebTorrent instances, and work with live streaming. We can add it as another option like the current torrentplayer. The biggest problem I'm having so far is background audio play.

sschueller commented 3 years ago

I am not a fan of doing javascript stuff in webviews. I would rather see if we can get what we need in ExoPlayer (https://exoplayer.dev/hls.html) and/or we talk to the PeerTube server team to get them to add a "support for mobile" options that will transcode to a format we can play.

Edit: Peertube is starting to recommend only using HLS with p2p. https://docs.joinpeertube.org/admin-configuration?id=vod-transcoding

Chocobozzz commented 3 years ago

Hi,

A built-in HLS player like exoplayer should be compatible with our hls playlist without extra effort

dhk2 commented 3 years ago

Will it work with live streams or share with peers?

Chocobozzz commented 3 years ago

It will work with live streams but you won't share with other peers, which is not a big deal (too complex to implement in a native app IMHO)

sschueller commented 3 years ago

I have added some basic HLS support in the latest release https://github.com/sschueller/peertube-android/releases/tag/v1.0.54. If a HLS stream exists it will be used, otherwise it will fall back to the old way of using what files are listed under the video's json. What is currently missing is selecting a specific track in the HLS playlist, this will require some additional work to read this and make it available in the UI.