GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
540 stars 59 forks source link

[Request]: Play PeerTube videos in Tuba #662

Open LukaszH77 opened 9 months ago

LukaszH77 commented 9 months ago

Describe the request

Is it possible for PeerTube videos to be played in Tuba's media viewer?

PeerTube is becoming more and more popular and it would be nice if I didn't have to open another app to watch videos from PT accounts I follow from Mastodon.

Implementation Details

GeopJr commented 9 months ago

It exists in Tuba right now but it's disabled, more info:

244

245

253

The main issues are:

  1. PeerTube supports at least 2 ways of showing videos, either streaming it or providing the whole file. The implementation currently in Tuba supports only streaming, but #253 adds file support too (though that PR hasnt been updated in a while). The way streaming works in Tuba has the following issue too, of not knowing how long the video is

image (ignore the zoom buttons, I haven't enabled PeerTube support in a while and hadn't noticed it during the media viewer refactors)

  1. The video sometimes just stops updating while the sound keeps playing, the cause of which might be the way I handle files in that PR. A potential fix would be to use the inputstreams directly but that's not possible at the moment due to gstreamer(?) bug (upstream is aware)

If you want to give it a try, change this to true and click the preview card of a peertube post (the peertube instance has to use streaming however, can't remember if they can disable it. I usually use https://tube.kockatoo.org/videos/local for testing)

https://github.com/GeopJr/Tuba/blob/a25615c8d864058534648563bca7bf6f86e77e46/src/API/Status/PreviewCard.vala#L130

I'll leave this issue open to track any progress!

LukaszH77 commented 9 months ago

Thank you for your answer, I'll check it out later