Interface: MediaItem
Represents a media asset within the player.
A minimal MediaItem requires only:
- an
id - a poster image
- a title
- a source
Additional fields can be supplied to support analytics, monetization, UI enhancements, and other use cases. In general, the richer the metadata, the more likely the MediaItem can satisfy all integration requirements.
Properties
id
id:
string
Unique identifier of the media item.
poster
poster:
string
Poster image of the media item.
sources
sources:
MediaSource[]
Sources of the media item.
title
title:
string
Title of the media item.
actors?
optionalactors:string[]
Name of actors appearing in the given media item
Example
["Cate Blanchett", "Leonardo DiCaprio"]additionalIds?
optionaladditionalIds:object
Additional ids that identify the media item in other systems
externalId?
optionalexternalId:string
originId?
optionaloriginId:string
originSourceId?
optionaloriginSourceId:string
ageRatingDetails?
optionalageRatingDetails:string[]
Additional details to show for the age rating (e.g. ['Alcohol']) next to the minimum age.
aspectRatio?
optionalaspectRatio:string
Aspect ratio of the media item. Useful when vertical variants are used.
Default Value
16:9
branding?
optionalbranding:object
Additional content branding
logoLinkUrl?
optionallogoLinkUrl:string
Optional link target for the logo
logoUrl?
optionallogoUrl:string
Logo that should appear in the corner
category?
optionalcategory:object
Category id and name of the media item
name
name:
string
id?
optionalid:string
channel?
optionalchannel:Channel
Channel (or often referred to as brand) of the media item.
competition?
optionalcompetition:object
Competition the media item belongs to
id?
optionalid:string
name?
optionalname:string
compilation?
optionalcompilation:object
Compilation the media item belongs to
id?
optionalid:string
name?
optionalname:string
contentOwner?
optionalcontentOwner:object
Content owner id and name of the media item
name
name:
string
id?
optionalid:string
description?
optionaldescription:string
Description of the media item.
duration?
optionalduration:number
Duration of the media item in seconds. Not defined when livestream.
endDate?
optionalendDate:number
Time when the media item expires. Unix timestamp in milliseconds. Useful for JSON-LD generation.
error?
optionalerror:MediaItemError
Error information if the media item is not available upfront.
genre?
optionalgenre:string
Genre of the media item (e.g. Documentary)
hasProductPlacement?
optionalhasProductPlacement:boolean
Whether the media item has product placements. Shows a product placement indicator in the UI.
iabCategories?
optionaliabCategories:string[]
IAB categories (as iabCategoryTaxonomy) of the media item. Used for monetization.
iabCategoryTaxonomy?
optionaliabCategoryTaxonomy:number
IAB category taxonomy used for iabCategories (see IAB spec for details )
Default Value
9 for IAB Tech Lab Content Taxonomy 3.1
isRecommendation?
optionalisRecommendation:boolean
Mark this media item as a recommendation.
keywords?
optionalkeywords:string[]
Keywords of the media item
labels?
optionallabels:object[]
Additional labels for this media item.
id
id:
string
name
name:
string
language?
optionallanguage:string
Language of the media item. 2-letter ISO language code.
Default Value
de (German)
links?
optionallinks:object[]
Links to related content (e.g., a news article or blog post).
caption
caption:
string
type
type:
"article"
url
url:
string
liveOnDemandChannel?
optionalliveOnDemandChannel:object
The live on demand channel (livestream using a VoD playlist, often called ODC) the media item belongs to
id?
optionalid:string
name?
optionalname:string
livestream?
optionallivestream:object
Livestream details
startTime
startTime:
number
UTC start time of the livestream in milliseconds
endTime?
optionalendTime:number
UTC end time of the livestream in milliseconds
epgEntries?
optionalepgEntries:object[]
EPG entries containing UTC start and end times in milliseconds. Can be used for timeshift functionality (e.g., jump markers within the DVR window).
logo?
optionallogo:string
Logo of the media item in size 220x90 (e.g. for shows, movies, sports events etc.)
logoAccentColor?
optionallogoAccentColor:string
Accent color of the media item that is shown behind the logo
logoAltText?
optionallogoAltText:string
Alt text for the logo of the media item
markers?
optionalmarkers: (Marker|CustomMarker)[]
Markers control ad breaks and custom time-based events during playback.
⚠️ Important: When providing custom markers, the default PREROLL is not added automatically. You must explicitly include a PREROLL marker if you want ads to play.
Reserved marker names: Only PREROLL, MIDROLL, and POSTROLL from KnownMarkerName
can be used for ad markers. All other KnownMarkerName values are reserved for internal use.
Use custom string names (e.g., 'halfwayPoint') for your own markers.
Listening for custom markers: When a custom marker is reached, the player dispatches an IntegrationEvent.CONTENT_MARKER_REACHED event. Listen for this event to react to your custom markers:
player.addEventListener('contentmarkerreached', (event) => {
const { markerName, markerData } = event.detail;
if (markerName === 'showEndCreditsOverlay') {
// Show your overlay
}
});Examples
// Default: pre-roll ads only (same as omitting markers)
markers: [{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 }]// Pre-roll + mid-roll at 60 seconds
markers: [
{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 },
{ name: KnownMarkerName.MIDROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 60 }
]// Custom marker at 50% of content
markers: [
{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 },
{ name: 'halfwayPoint', type: MarkerType.PERCENT, threshold: 0.5 }
]// Custom marker 15 seconds before end (e.g., for end credits overlay)
markers: [
{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 },
{ name: 'showEndCreditsOverlay', type: MarkerType.TIME_IN_SECONDS, threshold: -15 }
]Default Value
[{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 }]
metadataSource?
optionalmetadataSource:string
Indicates the source from which additional metadata was derived (e.g., “joyn”).
minimumAge?
optionalminimumAge:number
Minimum age to watch the media item. Shows a minimum age indicator in the UI.
Default Value
0 (no minimum age)
provider?
optionalprovider:MediaItemProvider
Indicates the provider of the media item
regionsAllowed?
optionalregionsAllowed:string[]
In which country can this media item be played (e.g. ['de', 'at'])? Useful for
JSON-LD generation.
Default Value
['all'] (worldwide)
releaseDate?
optionalreleaseDate:number
Release date of the media item. Unix timestamp in milliseconds. Useful for JSON-LD generation.
seoContentUrl?
optionalseoContentUrl:string
JSON-LD contentUrl that allows search engines to crawl the media source.
You should only allow known crawlers (how to verify Googlebot & Crawler )
to access those media sources.
show?
optionalshow:object
Show (often referred to as series, format or tv-show) the media item belongs to
name
name:
string
episodeNumber?
optionalepisodeNumber:number
id?
optionalid:string
seasonNumber?
optionalseasonNumber:number
teaser?
optionalteaser:object
Additional teaser options that improve the loading experience and enable additional integration variants.
firstFrame?
optionalfirstFrame:string
Image of the first frame of the media item. Used for initially showing the first frame of the media item.
firstFrameBlurHash?
optionalfirstFrameBlurHash:string|null
Blurhash  of the first frame of the media item. Used for coloring the background.
firstFrameBlurred?
optionalfirstFrameBlurred:string
Blurred version of the first frame of the media item. Used to show something early while loading.
posterBlurHash?
optionalposterBlurHash:string|null
Blurhash  of the poster of the media item. Used for coloring the background.
posterBlurred?
optionalposterBlurred:string
Blurred version of the poster of the media item. Used to show something early while loading.
video?
optionalvideo:string
Teaser video URL which is used for previewing the media item for some integrations.
textTracks?
optionaltextTracks:MediaItemTextTrack[]
Array of text tracks for subtitles, captions, etc. These tracks apply to the whole media item, not to individual sources.