Interface: MediaItem
Generic media entity used by the editor and Studio.
This shape is intentionally provider-agnostic and can represent:
- User-uploaded assets (local or cloud-backed)
- Public/provider assets (Pexels, Unsplash, internal stock, etc.)
NOTE:
- Existing consumers can continue to treat this as a simple MediaItem (id, type, url, thumbnail, duration, etc.).
- New fields (source/origin/provider/attribution) enable richer asset library experiences without breaking backwards compatibility.
Table of contents
Properties
- id
- name
- type
- url
- previewUrl
- thumbnail
- waveformUrl
- duration
- width
- height
- sizeBytes
- source
- origin
- provider
- providerId
- providerUrl
- attribution
- tags
- metadata
- arrayBuffer
Properties
id
• id: string
Stable internal id for this asset within the host app/library.
Defined in
packages/video-editor/src/helpers/types.ts:53
name
• name: string
Human-readable name (file name, provider title, etc.).
Defined in
packages/video-editor/src/helpers/types.ts:55
type
• type: string
Logical media type (video, audio, image, etc.).
Defined in
packages/video-editor/src/helpers/types.ts:57
url
• url: string
Primary URL used by canvas/visualizer and exports. This may point to user storage, CDN, or a third-party provider.
Defined in
packages/video-editor/src/helpers/types.ts:62
previewUrl
• Optional previewUrl: string
Optional preview image URL (thumbnail or poster frame). Prefer using this over the full asset for grid/list views.
Defined in
packages/video-editor/src/helpers/types.ts:67
thumbnail
• Optional thumbnail: string
Backwards-compatible thumbnail alias for previewUrl.
Defined in
packages/video-editor/src/helpers/types.ts:71
waveformUrl
• Optional waveformUrl: string
Optional URL to a precomputed audio waveform or spectrogram.
Defined in
packages/video-editor/src/helpers/types.ts:75
duration
• Optional duration: number
Duration in milliseconds for audio/video assets (if known).
Defined in
packages/video-editor/src/helpers/types.ts:77
width
• Optional width: number
Pixel dimensions for image/video assets (if known).
Defined in
packages/video-editor/src/helpers/types.ts:79
height
• Optional height: number
Defined in
packages/video-editor/src/helpers/types.ts:80
sizeBytes
• Optional sizeBytes: number
Approximate size of the original asset in bytes (if known).
Defined in
packages/video-editor/src/helpers/types.ts:82
source
• Optional source: MediaSource
High-level source category: user-owned vs public/provider. Undefined for legacy items defaults to user-owned semantics.
Defined in
packages/video-editor/src/helpers/types.ts:87
origin
• Optional origin: string
Origin of the asset (upload, pexels, unsplash, etc.). Useful for analytics and provider-specific policies.
Defined in
packages/video-editor/src/helpers/types.ts:92
provider
• Optional provider: string
Provider metadata (for public assets).
- provider: canonical provider id ('pexels', 'unsplash', ...)
- providerId: provider-specific asset id
- providerUrl: link back to the provider's detail page
Defined in
packages/video-editor/src/helpers/types.ts:99
providerId
• Optional providerId: string
Defined in
packages/video-editor/src/helpers/types.ts:100
providerUrl
• Optional providerUrl: string
Defined in
packages/video-editor/src/helpers/types.ts:101
attribution
• Optional attribution: Object
Attribution and licensing hints for public assets. The host app can surface this in UI or export flows.
Type declaration
| Name | Type |
|---|---|
text? | string |
author? | string |
authorUrl? | string |
licenseUrl? | string |
Defined in
packages/video-editor/src/helpers/types.ts:106
tags
• Optional tags: string[]
Free-form tags for search and filtering.
Defined in
packages/video-editor/src/helpers/types.ts:113
metadata
• Optional metadata: Object
Arbitrary structured metadata. Consumers should namespace their keys to avoid collisions.
Index signature
▪ [key: string]: any
Type declaration
| Name | Type |
|---|---|
title? | string |
Defined in
packages/video-editor/src/helpers/types.ts:118
arrayBuffer
• Optional arrayBuffer: ArrayBuffer
Optional serialized binary representation for local-only storage (e.g. IndexedDB via BrowserMediaManager).