interface MediaItem {
    id: string;
    kind: MediaKind;
    width: number;
    height: number;
    alt?: string;
    avgColor?: string;
    thumbnailUrl: string;
    previewUrl: string;
    fullUrl: string;
    duration?: number;
    sources?: MediaSource[];
    author: MediaAuthor;
    sourceUrl: string;
}

Properties

id: string
kind: MediaKind
width: number
height: number
alt?: string
avgColor?: string

Dominant color, useful as a placeholder background while media loads.

thumbnailUrl: string

Small image, safe for grid thumbnails at any kind.

previewUrl: string

Medium-res image; for video this is the poster frame.

fullUrl: string

Best-quality still (photos) or best-quality poster (videos).

duration?: number

Seconds. Videos only.

sources?: MediaSource[]

Playable renditions. Videos only.

author: MediaAuthor
sourceUrl: string

Attribution link back to the provider's page for this item.