Trending videos
Building the trending videos carousel
Finding trending videos of the users the logged-in user follows
The "Following" trending videos carousel is built using Fetching & Paginating most recent data from each of the previously picked "best" relay for each followed user, in parallel, with 1 filters JSON:
{"kinds":[1],"#l":[],"#q":[],"search": "post_feed:trending_videos","authors":["pubkey1","pubkey2"]}
The authors field is the previously determined list of followed users for each specific relay that is queried
post_feed:trending_videos is a custom search extension exclusive to our platform
TODO: Determine how to decide when to display all-in-portret or all-in-landscape. Is it something the client requests or is it a side effect the relay returns if some condition is met?
Displaying trending videos
All the returned events from each relay are merged together and ordered by created_at desc.
Each event is then displayed using the common approach.