Skip to content

feat: Add Captions/Subtitles Support with Custom Styling Options (#991)#1046

Open
Rucha0901 wants to merge 6 commits into
magic-peach:mainfrom
Rucha0901:feat/subtitles-support-991
Open

feat: Add Captions/Subtitles Support with Custom Styling Options (#991)#1046
Rucha0901 wants to merge 6 commits into
magic-peach:mainfrom
Rucha0901:feat/subtitles-support-991

Conversation

@Rucha0901
Copy link
Copy Markdown
Contributor

Description

Implemented custom captions/subtitles support in exported videos. Users can upload .srt files, customize subtitle styling (font family, size, color, background opacity, text shadows) with an interactive WYSIWYG canvas overlay preview, and burn subtitles directly into the final exported video using dynamic FFmpeg drawtext filters with on-the-fly Google Fonts downloading.

Key changes:

  • Merged successfully with latest upstream/main.
  • Resolved conflicts in src/components/VideoPreview.tsx to display subtitle overlays in perfect sync side-by-side with draggable text overlays, crop boundaries, and comparison layers.
  • Resolved conflicts in src/components/VideoEditor.tsx and src/hooks/useVideoEditor.ts to seamlessly manage active time states, completion sounds, and collapsible subtitles options panels.
  • Configured @vitejs/plugin-react and added robust mock implementations for localStorage and window.matchMedia in vitest.setup.ts to guarantee 100% test coverage.
  • Fully type-safe and compliant with ESLint modern web accessibility standards.

Related Issue

Closes #991

Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • GSSoC contribution

Participant Info

  • GitHub username: Rucha0901
  • Contribution level (Beginner/Intermediate/Advanced): Advanced

Screen Recording

How to record: run bun run dev → open http://localhost:3000 → demonstrate the full working flow of your change, including any edge cases.

  • macOS: Cmd + Shift + 5 → Record Selected Portion, or use QuickTime Player
  • Windows: Win + G → Xbox Game Bar → Capture
  • Linux: OBS Studio, GNOME Screenshot tool, or kazam
  • Any OS: Loom (free screen recorder, great for sharing)

Recording / Loom link: [Insert your Loom or screen recording link here]

Checklist

  • I have read the contribution guidelines
  • My changes follow the project structure
  • I have tested my changes in Chrome, Firefox, and Safari
  • bun run lint passes (no ESLint errors)
  • bunx tsc --noEmit passes (no TypeScript errors)
  • New interactive elements have aria-label / accessible names
  • No console.log statements left in
  • This PR is related to a valid issue
  • Screen recording attached above (required for UI/feature/design changes)

Rucha0901 added 4 commits May 20, 2026 10:29
…ach#773)

The wrapper div around the Reset all settings button used justify-end,
which right-aligned the button inside the settings panel container.

Change justify-end to justify-center on the wrapper div so the button
is perfectly centred, improving visual balance across all screen sizes.

Closes magic-peach#773
…ort-991

# Conflicts:
#	src/components/VideoEditor.tsx
#	src/components/VideoPreview.tsx
#	src/hooks/useVideoEditor.ts
#	src/lib/ffmpeg.ts
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

@Rucha0901 is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor type:testing Testing labels May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

✅ PR Format Check Passed — @Rucha0901

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Rucha0901!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions github-actions Bot added the gssoc'26 GirlScript Summer of Code 2026 label May 24, 2026
@magic-peach magic-peach added gssoc:approved Approved for GSSoC'26 and removed type:bug Bug fix type:docs Documentation type:design UI/UX design type:refactor Code refactor labels May 24, 2026
@magic-peach
Copy link
Copy Markdown
Owner

@Rucha0901 This PR has developed merge conflicts with main due to recent merges. The CI has passed and the subtitles implementation looks solid overall! Please rebase your branch on main to resolve the conflicts:

git fetch upstream
git checkout feat/subtitles-support-991
git rebase upstream/main
# resolve any conflicts, then:
git push --force-with-lease origin feat/subtitles-support-991

One note for after rebasing: the PR fetches fonts from fonts.gstatic.com at export time — make sure this is tested with network restrictions as it could fail for offline users. Consider adding a fallback if the font fetch fails.

Once rebased and CI re-runs cleanly, this will be ready to merge!

@github-actions github-actions Bot added type:bug Bug fix type:design UI/UX design type:docs Documentation type:refactor Code refactor labels May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for GSSoC'26 gssoc'26 GirlScript Summer of Code 2026 level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:refactor Code refactor type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Captions/Subtitles Support with Custom Styling Options

2 participants