feat: add downloadable video support and enhanced metadata - #2
Conversation
- Add downloadable video generation support to Cloudflare Stream adapter - Include video metadata fields: duration, dimensions, size, readyToStreamAt - Hide internal fields in admin UI for cleaner interface - Update type definitions to support new metadata fields - Configure payload to disable local storage in dev environment
There was a problem hiding this comment.
Pull request overview
This PR adds downloadable video support and enhanced metadata functionality to the Payload video stream plugin. The changes enable users to generate downloadable versions of their streamed videos through the Cloudflare Stream API while enriching video documents with comprehensive metadata like duration, dimensions, file size, and stream readiness timestamp. These fields are hidden in the admin UI to maintain a clean interface while preserving data accessibility.
Key changes:
- Added configurable download generation (
generateDownloadsparameter) for audio and video files - Enhanced metadata fields:
durationInSeconds,width,height,size, andreadyToStreamAt - Hidden internal metadata fields in admin UI for cleaner interface
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/hooks/afterOperation.ts |
Updates status hook to populate new metadata fields from streaming provider response |
src/fields/stream.ts |
Adds new metadata field definitions and hides internal fields from admin UI |
src/adapters/types.ts |
Updates TypeScript types to include new metadata properties |
src/adapters/cloudflareStream.ts |
Implements download generation logic and maps Cloudflare API response to new metadata fields |
dev/payload.config.ts |
Disables local storage in development environment |
| hidden: true, | ||
|
|
||
| readOnly: true, |
There was a problem hiding this comment.
Extra blank line between hidden and readOnly properties is inconsistent with the formatting of other field definitions in the file. Remove the blank line to maintain consistency.
| hidden: true, | ||
|
|
||
| readOnly: true, |
There was a problem hiding this comment.
Extra blank line between hidden and readOnly properties is inconsistent with the formatting of other field definitions in the file. Remove the blank line to maintain consistency.
| hidden: true, | ||
|
|
||
| readOnly: true, |
There was a problem hiding this comment.
Extra blank line between hidden and readOnly properties is inconsistent with the formatting of other field definitions in the file. Remove the blank line to maintain consistency.
| hidden: true, | ||
|
|
||
| readOnly: true, |
There was a problem hiding this comment.
Extra blank line between hidden and readOnly properties is inconsistent with the formatting of other field definitions in the file. Remove the blank line to maintain consistency.
| hidden: true, | ||
|
|
||
| readOnly: true, |
There was a problem hiding this comment.
Extra blank line between hidden and readOnly properties is inconsistent with the formatting of other field definitions in the file. Remove the blank line to maintain consistency.
| hidden: true, | ||
|
|
||
| readOnly: true, |
There was a problem hiding this comment.
Extra blank line between hidden and readOnly properties is inconsistent with the formatting of other field definitions in the file. Remove the blank line to maintain consistency.
# [1.2.0](v1.1.2...v1.2.0) (2025-11-30) ### Features * add downloadable video support and enhanced metadata ([#2](#2)) ([3755d93](3755d93))
What?
Added downloadable video support and enhanced metadata functionality to the Payload video stream plugin:
Why?
These changes are important because:
The downloadable feature is particularly valuable for content creators who need both streaming and download capabilities for their videos.
Screenshot (optional)
N/A - Backend functionality changes
Anything else? (optional)
generateDownloadsparameter incloudflareStreamAdaptercan be configured as:true(default): Generate both audio and video downloadsfalse: Disable download generation{ audio: boolean, video: boolean }: Fine-grained control over download typesType of changes