Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make video posts which are quote posts show up in video feeds #7534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kaytwo
Copy link
Contributor

@kaytwo kaytwo commented Jan 21, 2025

Because Video posts are fundamentally EmbedRecordWithMedia whereas plain video posts are EmbedVideo, the shape of the object and where the user's uploaded video exist within the post are different. This PR extracts the relevant EmbedVideo wherever relevant and passes it to the renderer.

Testing

Check this feed on live mobile / dev mobile / desktop: https://bsky.app/profile/feedtester.bsky.social/feed/videos

On desktop it's got 3 videos, on this branch on iOS it has 3 videos, on live it only shows 1 video (the non-quote-post one).

src/lib/embeds.ts Outdated Show resolved Hide resolved
@gaearon
Copy link
Collaborator

gaearon commented Jan 22, 2025

apologies, this would need a rebase

@kaytwo kaytwo force-pushed the main branch 2 times, most recently from 7f13745 to b20da65 Compare January 22, 2025 19:51
export function isVideoView(
v: unknown,
): v is
| AppBskyEmbedVideo.View
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type refinement feels like it should convince ts that the returned value can only be one of these two types of view but judging by my lsp it didn’t seem to work in practice.

@kaytwo
Copy link
Contributor Author

kaytwo commented Jan 24, 2025

@gaearon PTAL, successfully rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants