Skip to Content

TypeScript types

Use the shipped Rixl Core and framework types for media metadata, uploads, player state, and component props.

The SDK ships TypeScript declarations. Import types from the package rather than copying interfaces into application code; the declarations track the implementation and SDK schema.

Core types

import type {
  ImageData,
  VideoData,
  FeedPost,
  FeedPostsResponse,
  PlayerState,
  SettingsState,
  AnalyticsEvent,
  ConnectConfig,
  CreateImageUploadOptions,
  CreateVideoUploadOptions,
} from "@rixl/media-core";
TypePurpose
ImageData, VideoDataMedia metadata and file references
FeedPost, FeedPostsResponseFeed content and paginated results
PlayerState, SettingsStatePlayer state and shared preferences
AnalyticsEventAnalytics event union
ConnectConfig, AuthConfigShared client connection configuration
Chapter, SubtitleTrack, QualityLevelVideo navigation, captions, and quality
ProgressBarProps, ProgressBarControlsBrowser progress interactions
Upload option and result typesPresigned upload creation and transfer results

Framework packages re-export these types through /core.

Component props

UI props belong to their framework package:

import type {ImageProps} from "@rixl/media-react/image";
import type {VideoProps} from "@rixl/media-react/video";
import type {FeedProps} from "@rixl/media-react/feed";

Vue, Svelte, and Astro also export their own prop types. Angular components expose typed inputs and outputs. Lit registers tag-name types, so document.createElement("rixl-video") is typed after importing /video.

Validate configuration

import type {VideoProps} from "@rixl/media-react/video";

export const video = {
  id: "YOUR_VIDEO_ID",
  muted: true,
  chapters: false,
} satisfies VideoProps;

See Core API, uploads, and the framework's component reference for usage.