Skip to content

Feat/ps audio video streaming - #12

Merged
rex-9 merged 8 commits into
devfrom
feat/ps-audio-video-streaming
Sep 15, 2026
Merged

rex-9 merged 8 commits into
devfrom
feat/ps-audio-video-streaming

Conversation

@novenaurion

Copy link
Copy Markdown
Collaborator

Summary

Adds SRT subtitle upload and display for video and audio assets in admin, plus subtitle type/format filters.

Why

Video and audio assets had thumbnail upload but no way to attach captions. Admins needed to upload an SRT, see it on detail/edit, and filter subtitle assets in the list.

Changes

  • Added POST /v1/admin/assets/:id/subtitle/upload (same multipart file flow as thumbnail)
  • Added shared IChildAsset for thumbnail and subtitle (id, url, status, size_bytes)
  • Added Add subtitle on the asset edit page for video and audio (.srt only, existing non-video 10 MB limit)
  • Added subtitle status, size, and view link on asset detail and edit
  • Added subtitle to asset type and format dropdowns (create/edit type and list filters)
  • Added EN/MY locale strings for subtitle upload, validation, and display
  • Added AdminAssetController.uploadSubtitle unit tests (success with nested subtitle, failure)
  • Updated README.md and ECOSYSTEM.md for subtitle upload, display, filters, and API routes

Testing

This change was verified by...

  • ✅ Unit tests
  • Integration tests
  • ✅ Manual testing
  • ✅ Existing test suite passes

npx vitest run src/modules/admin/asset/asset.controller.test.ts — 17 passed.

Manual: on a video or audio asset edit page, upload a valid .srt under the non-video size limit and confirm the subtitle row appears on edit and detail. Confirm a non-SRT or oversized file is rejected. Confirm list filters include Type = Subtitle and Format = Subtitle.

Related Issues

Screenshots / Videos

Screenshot 2026-09-12 at 19 06 26

Notes

  • Subtitle upload reuses UPLOAD_SIZE_LIMITS.MAX_NON_VIDEO_SIZE_MB (default 10, from VITE_MEDIA_MAX_NON_VIDEO_SIZE_MB).
  • No list-page socket handling for subtitles; the edit page applies the API response the same way as thumbnail replace.
  • Requires Core POST /v1/admin/assets/:id/subtitle/upload.

Checklist

  • ✅ Code follows the project's conventions
  • ✅ Tests were added/updated where appropriate
  • ✅ Documentation was updated where appropriate
  • ✅ No unrelated changes are included

@rex-9
rex-9 merged commit 031dbc0 into dev Sep 15, 2026
1 check passed
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