Skip to main content

Trending videos

Building the trending videos carousel

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"]}
note

The authors field is the previously determined list of followed users for each specific relay that is queried

note

post_feed:trending_videos is a custom search extension exclusive to our platform

warning

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?

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.