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

✨ Show subtitles in videos, if there are any #187

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Conversation

foysalit
Copy link
Contributor

Screenshot 2024-09-11 at 20 21 50

Subtitle option

Screenshot 2024-09-11 at 20 21 45

Lang specific subtitles

@arcalinea arcalinea temporarily deployed to video-captions - ozone-staging PR #187 September 11, 2024 18:24 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to video-captions - ozone-staging PR #187 September 11, 2024 18:25 — with Render Destroyed
@@ -233,12 +233,14 @@ export function PostEmbeds({ item }: { item: AppBskyFeedDefs.FeedViewPost }) {
)

if (AppBskyEmbedVideo.isView(embed)) {
const captions = item.post.record?.['embed']?.['captions']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where the captions live in the record depends on whether it's a video embed, or a record-with-media embed. Would recommend using the lexicon type guards to figure out where to pull it from (will also make it less likely that you get an invalid captions value that causes a UI crash).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok I'm gonna merge this for now since this works. for cases that I'm missing here, will circle back and plug those up tomorrow.

@foysalit foysalit merged commit 6e0d973 into main Sep 11, 2024
3 checks passed
@matthieusieben matthieusieben deleted the video-captions branch November 15, 2024 14:54
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.

3 participants