feat(types): add VideoRenditionInfo types with typed resolution#1186
Open
feat(types): add VideoRenditionInfo types with typed resolution#1186
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
d0ef0a9 to
6934261
Compare
6934261 to
22ba2d2
Compare
22ba2d2 to
8242fe6
Compare
8242fe6 to
930208d
Compare
rdunk
requested changes
Feb 27, 2026
Member
rdunk
left a comment
There was a problem hiding this comment.
One suggestion for an improvement, it's not crucial but slightly better DX I think.
- Add VideoRenditionInfoPublic, VideoRenditionInfoSigned, and VideoRenditionInfo union type for MP4 renditions - Add renditions field to VideoPlaybackInfo interface - Type resolution with known values (1080p, 480p, 270p) plus string fallback - Add rendition examples to README playback info documentation - Re-export rendition types from media-library entry point Co-Authored-By: Claude <noreply@anthropic.com>
930208d to
8190893
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds rendition type definitions to
@sanity/clientto match the backend response shape.Part of DAM-1038
Changes
Types (
src/types.ts)VideoRenditionInfoPublic—url+resolutionVideoRenditionInfoSigned— extends public withtoken+expiresAtVideoRenditionInfo— union typerenditions?field added toVideoPlaybackInfoThe
resolutionproperty is typed as'1080p' | '480p' | '270p' | (string & {})— gives IDE autocomplete for known values while accepting any string for future resolutions.Exports (
src/media-library.ts)Re-exports all 3 rendition types from the media library entry point.
Documentation (
README.md)Note
Subtitle types have been split into a separate PR (#1191) for independent rollout.