sschueller/peertube-android

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

dhk2 opened this issue · 5 comments

dhk2 commented

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.

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

Hi,

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

dhk2 commented

Will it work with live streams or share with peers?

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)

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.