this post was submitted on 25 Jun 2025
12 points (100.0% liked)

Peertube

2466 readers
1 users here now

A free software to take back control of your videos

Peertube is an open, federated alternative to Youtube without advertising or tracking. On this site, you can find a good Peertube instance, with good rules, good moderation and most importantly a friendly community.

https://joinpeertube.org/

founded 5 years ago
MODERATORS
 

Today I was thinking about how great it would be if I could post a video to my blog and use the Peertube video player to display the video, and also get the benefit of having visitors share the video among themselves if two people were viewing the video at the same time.

I know that I could do that by running a Peertube instance and then using the embed feature to put the video on a web page. But is there any prior art for just using the client-side Peertube video player by itself? And is that even possible, or does it need a backend server for discovering other video players? I'm looking for documentation right now about how the P2P functionality works, and can't really find anything.

you are viewing a single comment's thread
view the rest of the comments
[–] tuckerm@feddit.online 3 points 5 days ago

OK, I found a little something here: https://docs.joinpeertube.org/contribute/architecture#concepts-1

It says this:

Segments are loaded by HTTP from the origin server + servers that mirrored the video and by WebRTC from other web browsers that are watching the video. They are used by hls.js to stream them into the HTML element

That "from other web browsers that are watching the video" is what I'm curious about: how does it know who those people are?

Sounds like I need to learn more about hls.js and Peertube's custom loader for it.