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.

  • tuckerm@feddit.onlineOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 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 <video> 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.

  • ozoned@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 days ago

    I’m seeing this question more and more. As of this moment I don’t know of any clients or web ways to watch the videos or help offload videos. There’s the mobile app, you can embed videos, but all of that still neess the full peertube somewhere.

    Since so many folks keep asking about it, I’d love to see someone try to make a client or lightweight video hosting that federates or something like that. But it’d take the community as there’s only one Dev for Peertube and they’re busy with Peertube itself.

    If folks know of something that OP is talking about I’d also love to know!

    • tuckerm@feddit.onlineOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 days ago

      Well, I’m glad to know that at least there isn’t some obvious solution that I’m missing. I might be able to explore this myself a little later – I’ve been curious about P2P things lately.

      P.S. thanks for making Fireside Fedi!

      • ozoned@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        Thank you for listening! :-)

        My group has been attempting to figure this out as well. LogalDeveloper has tried leveraging WebTorrent, but it seems that Peertube has deprecated that and while it can hook it, it never servers anything to anyone. Then he found out they changed to WebRTC and it does more of a direct push.

        We do know that folks can set a redundancy in Peertube and then the end user will pull from any of the redundancy sites. Which isn’t really ideal, because if you have a bad site, that’s obviously outside of your control, it could make a poor experience for the end user. At least this is our theory and appears to be true.

        If we’re wrong, we’d love to know how and where. But Peertube is REALLY impressive imo as to all it’s doing. And it seems like they’re really open to help.

  • Ulrich@feddit.org
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    6 days ago

    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?

    I don’t understand the question

    • tuckerm@feddit.onlineOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      What I mean is: has anyone taken just the frontend Javascript for Peertube’s video player and used that by itself, without running a full Peertube server? And if so, can that video player make P2P connections with other people’s browsers that are watching the same video?