Class: MediaMetadata

  • chrome.cast.media.MediaMetadata is a class that represents common media metadata, used to describe media information or sections within a media container.

  • It includes properties like metadataType, queueItemId, sectionDuration, and others to define various aspects of the media content.

  • The MediaMetadata constructor requires a type parameter specifying the type of metadata, such as movie, music track, or photo.

  • It has properties for specifying section start times and durations, useful for describing segments within a larger media file or live stream.

  • While type property is deprecated, developers should now use the metadataType property instead for specifying the type of media.

Constructor

MediaMetadata

new MediaMetadata(type)

Parameter

type

chrome.cast.media.MetadataType

Type of metadata.

Value must not be null.

Properties

metadataType

non-null chrome.cast.media.MetadataType

The type of metadata.

queueItemId

(number or undefined)

The queue item that include this media section. Only relevant if used in container sections, and there are multiple media items for the container.

sectionDuration

(number or undefined)

The media section duration in seconds. Only needed if the metadata describes a section of the media file that has a different duration value.

sectionStartAbsoluteTime

(number or undefined)

Alternative way to provide section start time for live media. Provides start time in Epoch time in seconds.

sectionStartTimeInContainer

(number or undefined)

The media section start time offset within the container in seconds. If not provided it assumes it's the same as the offset witnin media.

sectionStartTimeInMedia

(number or undefined)

The media section start time within media file in seconds. This can be negative if a section started in previous file.

type

non-null chrome.cast.media.MetadataType

The type of metadata.

Deprecated
Please use metadataType instead.