Interface MediaTailorSource

Represents a source for the MediaTailor integration.

interface MediaTailorSource {
    abr?: SourceAbrConfiguration;
    adParams?: Record<string, string>;
    contentProtection?: DRMConfiguration;
    crossOrigin?: CrossOriginSetting;
    dash?: DashPlaybackConfiguration;
    drm?: DRMConfiguration;
    hls?: HlsPlaybackConfiguration;
    hlsDateRange?: boolean;
    ignoreEmbeddedTextTrackTypes?: TextTrackType[];
    integration: "mediatailor";
    lcevc?: boolean;
    liveOffset?: number;
    lowLatency?: boolean;
    seamlessSwitchStrategy?: SeamlessSwitchStrategy;
    src?: string;
    ssai?: ServerSideAdInsertionConfiguration;
    timeServer?: string;
    type?: string;
    useCredentials?: boolean;
    useManagedMediaSource?: boolean;
    useNativePlayback?: boolean;
}

Hierarchy (view full)

Properties

The source's ABR configuration.

Remarks


- Available since v3.1.0.
- Overrides PlayerConfiguration.abr.
- Used for DASH and LL-HLS streams.

adParams?: Record<string, string>

Optional ad parameters to perform client-side ad reporting. For more information visit https://docs.aws.amazon.com/mediatailor/latest/ug/ad-reporting-client-side.html .

contentProtection?: DRMConfiguration

The content protection parameters for the media resource.

Remarks


- Available since v2.15.0.

crossOrigin?: CrossOriginSetting

The cross-origin setting of the source.

Default Value

''

Remarks


- Available since v2.9.0.

The configuration for controlling playback of an MPEG-DASH stream.

Remarks


- Available since v2.79.0.
- Ignored for non-DASH streams.

The content protection parameters for the media resource.

Deprecated

Superseded by TypedSource.contentProtection.

The configuration for controlling playback of an HLS stream.

Remarks


- Available since v2.82.0.
- Ignored for non-HLS streams.

hlsDateRange?: boolean

Whether the player should parse and expose date ranges from HLS manifests.

Default Value

false

Remarks


- Available since v2.61.0.

ignoreEmbeddedTextTrackTypes?: TextTrackType[]

A list of embedded TextTrackTypes to ignore when parsing media segments.

Remarks


- Available since v5.9.0
- Only 'cea608' and 'emsg' can currently be ignored.
- Only for DASH and HLS playback.

integration: "mediatailor"

The integration ID of the source.

lcevc?: boolean

Whether this source should be played using the LCEVC sdk.

Remarks


- Requires the LCEVC feature to be enabled.
- Requires the V-Nova LCEVC SDK to be loaded on the page.
- Only available for DASH and HLS streams.

liveOffset?: number

The offset in seconds used to determine the live point. This live point is the end of the manifest minus the provided offset.

Remarks


- Available since v2.35.0.

Default Value

Three times the segment's target duration.
lowLatency?: boolean

Whether the source should be played in the low-latency-mode of the player.

Default Value

false

Remarks


- This setting must be true when using Low-Latency CMAF with ABR.
- Available since v2.62.0.

seamlessSwitchStrategy?: SeamlessSwitchStrategy

Whether to seamlessly switch between discontinuities or periods.

Remarks

The player supports two strategies for handling a switch between two discontinuities in an HLS stream or two periods in an MPEG-DASH stream:
- Seamless: Once the player is done buffering the current discontinuity/period, it immediately starts buffering the next discontinuity/period. This requires that the current discontinuity/period and the next discontinuity/period have compatible codecs and content protection, or that the platform supports buffering different codecs in a single player. Because the next discontinuity/period is preloaded ahead of time, this makes the actual switch between discontinuities/periods (almost) completely seamless.
- Hard: The player waits until playback reaches the end of the current discontinuity/period before buffering and playing the next discontinuity/period. Because the buffering is not done ahead of time, this may result in a noticeable stall at the start of the next discontinuity/period. However, this strategy does not require any special platform support, so it works on any platform or device.

By default, the player will automatically choose between a seamless or a hard discontinuity/period switch based on the codecs and content protection of the two discontinuities/periods, and the support information reported by the platform. However, if you notice that the player makes an incorrect decision on certain streams or platforms, you can use this option to override its behavior as a stopgap solution. (You should still report this problem to THEOplayer support, so we can improve the player's default behavior and you can remove this override.)

Default Value

'auto'

src?: string

The source URL of the media resource.

Remarks


- Required if the ssai property is absent.
- Available since v2.4.0.

The Server-side Ad Insertion parameters for the media resource.

Remarks


- Available since v2.12.0.

timeServer?: string

The URL of a time server used by the player to synchronise the time in DASH sources.

Remarks


- Available since v2.47.0.
- The time server should return time in ISO-8601 format.
- Overrides the time server provided the DASH manifest's <UTCTiming>.
- Only this source will use the time server. Alternatively, for all source use SourceConfiguration.timeServer.

type?: string

The content type (MIME type) of the media resource, represented by a value from the following list:
- 'application/dash+xml': The media resource is an MPEG-DASH stream.
- 'application/x-mpegURL' or 'application/vnd.apple.mpegurl': The media resource is an HLS stream.
- 'video/mp4', 'video/webm' and other formats: The media resource should use native HTML5 playback if supported by the browser.
- 'application/vnd.theo.hesp+json': The media resource is an HESP stream.

Remarks


- Available since v2.4.0.

useCredentials?: boolean

Whether the player is allowed to use credentials for cross-origin requests.

Remarks


- Credentials are cookies, authorization headers or TLS client certificates.

Default Value

false

useManagedMediaSource?: boolean

(Experimental) Whether to use ManagedMediaSource if available.

Default Value

false

Remarks


- Available since v6.2.0.
- At the moment, this requires iOS 17.1 beta 2 or higher, with the "Managed Media Source API" feature flag turned on in the Advanced settings of Safari.
- Ignored if BaseSource.useNativePlayback is true.

See

https://github.com/w3c/media-source/issues/320

useNativePlayback?: boolean

Whether this source should be played using native playback.

Default Value

false

Remarks


- Available since v2.68.0.
- Ignored for DASH streams.
- Only supported on browsers that can play HLS streams natively, will error otherwise.

Generated using TypeDoc