planetary-social / nos

nos.social social media for all of us, using nostr
https://nos.social
Mozilla Public License 2.0
119 stars 14 forks source link

[Media Display] Determine whether videos are vertical or horizontal #1425

Open joshuatbrown opened 2 weeks ago

joshuatbrown commented 2 weeks ago

For videos that appear in the feed, determine whether they are vertical or horizontal. We're doing part of this in #1172, but that requires metadata from the NIP-92 imeta tags. This ticket should cover the other cases, such as getting the aspect ratio from the DIP-01 tags and the OpenGraph preview metadata.

This fulfills the following story:

After this ticket is complete:

joshuatbrown commented 2 weeks ago

Thoughts from Matt on implementation of this:

  • for some videos we can probably get the aspect ratio from the OpenGraph preview metadata
  • for some we might be able to get it from the DIP-01 tags
  • for some we might be able to get it from the NIP-92 tags

I think every file storage mechanism there is a different way to get the metadata. I bet Blossom and nostr.build have some way to get it too. But there is no uniform way to get it for any URL.

joshuatbrown commented 4 days ago

I'm breaking this ticket down into smaller parts. #1479 will be the part where we implement the fetching of OpenGraph metadata. I'll leave this one open to represent the user story called "Displaying horizontal and vertical videos in Nos".

joshuatbrown commented 4 days ago

Oops. It's already broken into smaller parts. #1165 is the one we'll implement when we fetch OpenGraph metadata. #1479 is a duplicate of that, so I closed it.