logo

THEOplayer > BaseSource

BaseSource interface

Represents the common properties of a media resource.

Signature:

export interface BaseSource 

Properties

Property

Type

Description

abr (optional)

SourceAbrConfiguration

The source's ABR configuration.

crossOrigin (optional)

CrossOriginSetting

The cross-origin setting of the source.

dash (optional)

DashPlaybackConfiguration

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

hls (optional)

HlsPlaybackConfiguration

The configuration for controlling playback of an HLS stream.

hlsDateRange (optional)

boolean

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

ignoreEmbeddedTextTrackTypes (optional)

TextTrackType[]

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

integration (optional)

SourceIntegrationId

The integration ID of the source.

lcevc (optional)

boolean

Whether this source should be played using the LCEVC sdk.

liveOffset (optional)

number

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

lowLatency (optional)

boolean

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

timeServer (optional)

string

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

useCredentials (optional)

boolean

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

useManagedMediaSource (optional)

boolean

(Experimental) Whether to use ManagedMediaSource if available.

useNativePlayback (optional)

boolean

Whether this source should be played using native playback.

Property Details

abr

The source's ABR configuration.

Signature:

abr?: SourceAbrConfiguration;

Remarks


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

crossOrigin

The cross-origin setting of the source.

Signature:

crossOrigin?: CrossOriginSetting;

Remarks


- Available since v2.9.0.

dash

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

Signature:

dash?: DashPlaybackConfiguration;

Remarks


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

hls

The configuration for controlling playback of an HLS stream.

Signature:

hls?: HlsPlaybackConfiguration;

Remarks


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

hlsDateRange

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

Signature:

hlsDateRange?: boolean;

Remarks


- Available since v2.61.0.

ignoreEmbeddedTextTrackTypes

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

Signature:

ignoreEmbeddedTextTrackTypes?: TextTrackType[];

Remarks


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

integration

The integration ID of the source.

Signature:

integration?: SourceIntegrationId;

Remarks


- This can be used to signal that a source is specific to an integration.

lcevc

Whether this source should be played using the LCEVC sdk.

Signature:

lcevc?: boolean;

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

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

Signature:

liveOffset?: number;

Remarks


- Available since v2.35.0.

lowLatency

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

Signature:

lowLatency?: boolean;

Remarks


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

timeServer

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

Signature:

timeServer?: string;

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.

useCredentials

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

Signature:

useCredentials?: boolean;

Remarks


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

useManagedMediaSource

(Experimental) Whether to use ManagedMediaSource if available.

Signature:

useManagedMediaSource?: boolean;

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.

useNativePlayback

Whether this source should be played using native playback.

Signature:

useNativePlayback?: boolean;

Remarks


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

github
Make sure to follow us on GitHub!
THEO-logo-white
twitter
facebook
linkedin
Copyright © 2022. All Rights Reserved.
Leuven
New York
Singapore
Barcelona