Skip to Content

title: SourceMediaItemWithToken

Interface: SourceMediaItemWithToken

A token-authenticated media source — an alternative to SourceMediaItemBase for providers that resolve the playback URL server-side using a token rather than exposing a direct src URL. The provider detects these via mimetype and handles entitlement internally.

Extends

interface SourceMediaItemWithToken {    id: string;    mimetype: Mimetype | string & {};    playbackMode: PlaybackMode;    token: string;    duration?: number;    liveEdgeOnly?: boolean;    userTier?: UserTier;    validUntil?: number;    wasExpiredAtLoad?: boolean;}

Properties

id

id: string

Unique identifier of the media source.


mimetype

mimetype: Mimetype | string & object

Mimetype of the media source. Could also be a custom value.


playbackMode

playbackMode: PlaybackMode

Playback mode of the media source (e.g. determines VOD or Live).


token

token: string

User token used for authentication.


duration?

optional duration: number

Duration in seconds. Only relevant for dynamic content.

Inherited from

SourceMediaItemBase.duration


liveEdgeOnly?

optional liveEdgeOnly: boolean

When true, playback must always remain at the live edge. Seeking behind the live edge is not permitted.

Default Value

undefined (treated as false — timeshift / seek-back is allowed)

Inherited from

SourceMediaItemBase.liveEdgeOnly


userTier?

optional userTier: UserTier

Classification of the user’s access level for this source.

Default Value

undefined (user tier is unknown or not applicable)

Inherited from

SourceMediaItemBase.userTier


validUntil?

optional validUntil: number

Until the media source is valid. Unix timestamp in milliseconds.

Inherited from

SourceMediaItemBase.validUntil


wasExpiredAtLoad?

optional wasExpiredAtLoad: boolean

true when this source’s signed token was already expired when resolved. Used to skip the expiry reload, which would otherwise re-resolve the same dead token in a loop. Re-derived on every resolve.

Inherited from

SourceMediaItemBase.wasExpiredAtLoad