Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.04k stars 1.5k forks source link

user and channel federation #1604

Closed roipoussiere closed 3 years ago

roipoussiere commented 5 years ago

As an instance administrator, it could be interesting to have the possibility to federate my instance to a user or a channel registered on a remote instance, instead of federating to the whole instance.

Among others user cases, my instance could be dedicated to a specific topic, and I know that some user or channel in the fediverse produces content related to this topic, so I want to share them to my instance's users.

In this way some people could even create an instance without owning any video, but simply aggregating some users and channels in the fediverse that they find interesting.

thibaultamartin commented 4 years ago

@Chocobozzz this probably would be nice to have in a v3 of PeerTube :)

Findus23 commented 4 years ago

For an example of an use case for this (as this is my most wished peertube feature): The official Peertube channel of the KDE team (@kde@peertube.mastodon.host) has some great videos I would love to show on my instance. Also it would be great to add redundancy to them as some of their videos are getting a lot of views. But I am unable to do either as that would mean following peertube.mastodon.host which adds a huge amount of completly unrelated videos to my instance.

spacekookie commented 4 years ago

I think being able to follow remote channels without my server federating with the entire remote server is important. A friend is hosting the instance I'm on at the moment and I wouldn't want to have to host my own instance just to be able to follow people on other servers.

I kinda feel this is a pretty fundamental part of a federated network that's missing at the moment.

fflorent commented 3 years ago

I also really need this and I'd love to propose a PR, but due to my lack of time, I cannot submit a contribution very soon and I would probably work on it in a sporadically.

As a first step, I use this post to study the feature, share functional consideration and link to interesting pieces of code. Please comment it and share your feedback!

Use case

As a instance administrator, I want to follow a remote user or a remote channel so I can publish their videos on my instance pages and feeds.

Terms

Acceptance Criteria

image

Nice to have:

Available alternatives

Plugin development

One can develop a plugin in order to fulfill the above needs. But the plugin API have some drawbacks:

Technical considerations

Server-side pieces of code to adapt

API

The API route handler (documentation) can be adapted in order to accept not only domains but also account identifiers: https://github.com/Chocobozzz/PeerTube/blob/a02b93ce756d646a59cef57b5e4ff53c2bb30bec/server/controllers/api/server/follows.ts#L127-L142

Jobs

TODO

Client-side pieces of code to adapt

Labels to adapt

Validators

The popup must accept either domains OR actor identifiers (@id@peertube-domain.tld)

https://github.com/Chocobozzz/PeerTube/blob/4f926722ea6784ea389013378fd233f59077ec8a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts

Unit tests

TODO

TILvids commented 3 years ago

I would also like to put my support behind this feature, it's something I very much could use on my instance. Like others have mentioned, I often want to follow a specific user/channel, rather than a whole instance. This is because my instance is very focused on one type of content, which often matches with individual users on other instances, but not the instance as a whole. Following the whole instance would introduce a number of videos that do not match with my instance.

jeena commented 3 years ago

@spacekookie you as a user already can subscribe to channels on other instances which your instance doesn't federate yet. But the UI for it is not obvious, therefor I created a educational video to show how it's done, hope it helps: https://tube.jeena.net/videos/watch/51a189cf-3372-4f97-9ff7-b5982dce4c9e

Chocobozzz commented 3 years ago

Implemented in https://github.com/Chocobozzz/PeerTube/commit/4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef

TILvids commented 3 years ago

Excellent, nice job!