Video

Video — Cloudflare Stream specialization of a file row. Surfaced alongside its file data via the filtered `/api/videos` endpoint. Keyed by its own `vid_…` id, with a unique 1:1 FK to the underlying file (`fileId`). Transcoding is async inside CF. The row starts in `processing` and lazy-reconciles to `ready`/`error` on subsequent `GET /api/videos/:id` calls (the service hits CF Stream's status API and updates the row).

Definition

TypeScript
interface Video {
  id: string;
  fileId: string;
  workspaceId: string;
  cfStreamUid: string;
  transcodingStatus: "error" | "ready" | "queued" | "processing";
  transcodingError: string | null;
  duration: number | null;
  width: number | null;
  height: number | null;
  size: number | null;
  metadata: any;
  playbackUrl: string;
  thumbnailUrl: string;
  signedToken: string | null;
}

Fields

FieldTypeNotes
idstringreadonly required — The video's prefixed ID.
fileIdstringrequired — Underlying file row backing this video (1
).
workspaceIdstringrequired — Workspace that owns the video.
cfStreamUidstringrequired — Cloudflare Stream UID used to build playback URLs.
transcodingStatus"error" | "ready" | "queued" | "processing"required — Async transcoding lifecycle: 'queued' → 'processing' → 'ready', or 'error'.
transcodingErrorstring | nullrequired — Error message from CF Stream when status is 'error'.
durationnumber | nullrequired — Duration in seconds, once CF Stream reports it.
widthnumber | nullrequired — Video width in pixels, if known.
heightnumber | nullrequired — Video height in pixels, if known.
sizenumber | nullrequired — Video size in bytes, if known.
metadataanyrequired — Additional metadata returned by CF Stream.
playbackUrlstringrequired — Cloudflare Stream HLS manifest URL
thumbnailUrlstringrequired — Cloudflare Stream thumbnail URL
signedTokenstring | nullrequired — Signed CF Stream JWT for private playback. Pass as the src prop of @cloudflare/stream-react's component. null when signing is not configured.