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

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.


additionalIds?

optional additionalIds: object

Additional ids that identify the media item in other systems

externalId?

optional externalId: string

joynId?

optional joynId: string

joynMediaId?

optional joynMediaId: string


ageRatingDetails?

optional ageRatingDetails: string[]

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


aspectRatio?

optional aspectRatio: string

Aspect ratio of the media item. Useful when vertical variants are used.

Default Value

16:9


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


category?

optional category: object

Category id and name of the media item

name

name: string

id?

optional id: string


channel?

optional channel: Channel

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


competition?

optional competition: object

Competition the media item belongs to

id?

optional id: string

name?

optional name: string


compilation?

optional compilation: object

Compilation the media item belongs to

id?

optional id: string

name?

optional name: string


contentOwner?

optional contentOwner: object

Content owner id and name of the media item

name

name: string

id?

optional id: string


description?

optional description: string

Description of the media item.


duration?

optional duration: number

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


endDate?

optional endDate: number

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


error?

optional error: MediaItemError

Error information if the media item is not available upfront.


genre?

optional genre: string

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


hasProductPlacement?

optional hasProductPlacement: boolean

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


iabCategories?

optional iabCategories: string[]

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


iabCategoryTaxonomy?

optional iabCategoryTaxonomy: number

IAB category taxonomy used for iabCategories (see IAB spec for details )

Default Value

9 for IAB Tech Lab Content Taxonomy 3.1


isRecommendation?

optional isRecommendation: boolean

Mark this media item as a recommendation.


keywords?

optional keywords: string[]

Keywords of the media item


labels?

optional labels: object[]

Additional labels for this media item.

id

id: string

name

name: string


language?

optional language: string

Language of the media item. 2-letter ISO language code.

Default Value

de (German)


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


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


optional logo: string

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


logoAccentColor?

optional logoAccentColor: string

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


logoAltText?

optional logoAltText: string

Alt text for the logo of the media item


markers?

optional markers: (Marker | CustomMarker)[]

Markers of the media item.

Default Value

[{ name: KnownMarkerName.PREROLL, type: MarkerType.TIME_IN_SECONDS, threshold: 0 }]


metadataSource?

optional metadataSource: string

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


minimumAge?

optional minimumAge: number

Minimum age to watch the media item. Shows a minimum age indicator in the UI.

Default Value

0 (no minimum age)


regionsAllowed?

optional regionsAllowed: string[]

In which country can this media item be played (e.g. ['de', 'at'])? Useful for JSON-LD generation.

Default Value

['all'] (worldwide)


releaseDate?

optional releaseDate: number

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


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.


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


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.


textTracks?

optional textTracks: TextTrack[]

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

Last updated on