Skip to Content
The new glomex player is released! 🎉View upgrade guide

Interface: MediaItemResolved

Represents a MediaItem after it has been resolved by the player.

When a MediaItem is passed to the player, it is expanded into a MediaItemResolved: fields that were omitted receive sensible defaults (e.g. id, language, aspectRatio), and additional fields such as originalId, provider, and ppsj are derived automatically.

As a result, several properties that are optional on MediaItem become required here.

Extends

  • Omit<MediaItem, "id" | "sources" | "title" | "regionsAllowed" | "aspectRatio" | "minimumAge" | "iabCategoryTaxonomy" | "language">

Properties

aspectRatio

aspectRatio: string


iabCategoryTaxonomy

iabCategoryTaxonomy: number


id

id: string


language

language: string


minimumAge

minimumAge: number


originalId

originalId: string

The original ID of the media item before any transformations. It gets automatically generated if not provided.


provider

provider: "glomex" | MediaItemProvider | "joyn" | "external"

Indicates the provider of the media item.


regionsAllowed

regionsAllowed: string[]


sources

sources: MediaSource[]


title

title: string


actors?

optional actors: string[]

Name of actors appearing in the given media item

Example

["Cate Blanchett", "Leonardo DiCaprio"]

Inherited from

MediaItem.actors


additionalIds?

optional additionalIds: object

Additional ids that identify the media item in other systems

externalId?

optional externalId: string

originId?

optional originId: string

Inherited from

MediaItem.additionalIds


ageRatingDetails?

optional ageRatingDetails: string[]

Additional details to show for the age rating (e.g. ['Alcohol']) next to the minimum age.

Inherited from

MediaItem.ageRatingDetails


branding?

optional branding: object

Additional content branding

logoLinkUrl?

optional logoLinkUrl: string

Optional link target for the logo

logoUrl?

optional logoUrl: string

Logo that should appear in the corner

Inherited from

MediaItem.branding


category?

optional category: object

Category id and name of the media item

name

name: string

id?

optional id: string

Inherited from

MediaItem.category


channel?

optional channel: Channel

Channel (or often referred to as brand) of the media item.

Inherited from

MediaItem.channel


competition?

optional competition: object

Competition the media item belongs to

id?

optional id: string

name?

optional name: string

Inherited from

MediaItem.competition


compilation?

optional compilation: object

Compilation the media item belongs to

id?

optional id: string

name?

optional name: string

Inherited from

MediaItem.compilation


contentOwner?

optional contentOwner: object

Content owner id and name of the media item

name

name: string

id?

optional id: string

Inherited from

MediaItem.contentOwner


description?

optional description: string

Description of the media item.

Inherited from

MediaItem.description


duration?

optional duration: number

Duration of the media item in seconds. Not defined when livestream.

Inherited from

MediaItem.duration


endDate?

optional endDate: number

Time when the media item expires. Unix timestamp in milliseconds. Useful for JSON-LD generation.

Inherited from

MediaItem.endDate


error?

optional error: MediaItemError

Error information if the media item is not available upfront.

Inherited from

MediaItem.error


genre?

optional genre: string

Genre of the media item (e.g. Documentary)

Inherited from

MediaItem.genre


hasProductPlacement?

optional hasProductPlacement: boolean

Whether the media item has product placements. Shows a product placement indicator in the UI.

Inherited from

MediaItem.hasProductPlacement


iabCategories?

optional iabCategories: string[]

IAB categories (as iabCategoryTaxonomy) of the media item. Used for monetization.

Inherited from

MediaItem.iabCategories


isRecommendation?

optional isRecommendation: boolean

Mark this media item as a recommendation.

Inherited from

MediaItem.isRecommendation


keywords?

optional keywords: string[]

Keywords of the media item

Inherited from

MediaItem.keywords


labels?

optional labels: object[]

Additional labels for this media item.

id

id: string

name

name: string

Inherited from

MediaItem.labels


optional links: object[]

Links to related content (e.g., a news article or blog post).

caption

caption: string

type

type: "article"

url

url: string

Inherited from

MediaItem.links


liveOnDemandChannel?

optional liveOnDemandChannel: object

The live on demand channel (livestream using a VoD playlist, often called ODC) the media item belongs to

id?

optional id: string

name?

optional name: string

Inherited from

MediaItem.liveOnDemandChannel


livestream?

optional livestream: object

Livestream details

startTime

startTime: number

UTC start time of the livestream in milliseconds

endTime?

optional endTime: number

UTC end time of the livestream in milliseconds

epgEntries?

optional epgEntries: 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).

Inherited from

MediaItem.livestream


optional logo: string

Logo of the media item in size 220x90 (e.g. for shows, movies, sports events etc.)

Inherited from

MediaItem.logo


logoAccentColor?

optional logoAccentColor: string

Accent color of the media item that is shown behind the logo

Inherited from

MediaItem.logoAccentColor


logoAltText?

optional logoAltText: string

Alt text for the logo of the media item

Inherited from

MediaItem.logoAltText


markers?

optional markers: (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 }]

Inherited from

MediaItem.markers


metadataSource?

optional metadataSource: string

Indicates the source from which additional metadata was derived (e.g., “joyn”).

Inherited from

MediaItem.metadataSource


poster?

optional poster: string

Poster image of the media item.

Inherited from

MediaItem.poster


releaseDate?

optional releaseDate: number

Release date of the media item. Unix timestamp in milliseconds. Useful for JSON-LD generation.

Inherited from

MediaItem.releaseDate


seoContentUrl?

optional seoContentUrl: 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.

Inherited from

MediaItem.seoContentUrl


show?

optional show: object

Show (often referred to as series, format or tv-show) the media item belongs to

name

name: string

episodeNumber?

optional episodeNumber: number

id?

optional id: string

seasonNumber?

optional seasonNumber: number

Inherited from

MediaItem.show


teaser?

optional teaser: object

Additional teaser options that improve the loading experience and enable additional integration variants.

firstFrame?

optional firstFrame: string

Image of the first frame of the media item. Used for initially showing the first frame of the media item.

firstFrameBlurHash?

optional firstFrameBlurHash: string | null

Blurhash  of the first frame of the media item. Used for coloring the background.

firstFrameBlurred?

optional firstFrameBlurred: string

Blurred version of the first frame of the media item. Used to show something early while loading.

posterBlurHash?

optional posterBlurHash: string | null

Blurhash  of the poster of the media item. Used for coloring the background.

posterBlurred?

optional posterBlurred: string

Blurred version of the poster of the media item. Used to show something early while loading.

video?

optional video: string

Teaser video URL which is used for previewing the media item for some integrations.

Inherited from

MediaItem.teaser


textTracks?

optional textTracks: MediaItemTextTrack[]

Array of text tracks for subtitles, captions, etc. These tracks apply to the whole media item, not to individual sources.

Note: This is only useful for progressive sources or when the adaptive stream (HLS/DASH) does not deliver the text tracks / subtitles within the manifest.

Inherited from

MediaItem.textTracks

Last updated on