Interface SourceConfiguration

Describes the configuration of a player's source.

interface SourceConfiguration {
    ads?: AdDescription[];
    analytics?: AnalyticsDescription[];
    blockContentIfAdError?: boolean;
    contentProtection?: DRMConfiguration;
    drm?: DRMConfiguration;
    manifestMetadataTrack?: boolean;
    metadata?: ChromecastMetadataDescription;
    mutedAutoplay?: MutedAutoplayConfiguration;
    playAdsAfterTime?: number;
    poster?: string;
    streamType?: StreamType;
    textTracks?: TextTrackDescription[];
    timeServer?: string;
    vr?: VRConfiguration;
}

Hierarchy (view full)

Properties

List of AdDescriptions to be queued for playback.

analytics?: AnalyticsDescription[]

List of AnalyticsDescriptions to configure analytics integrations for the media source.

blockContentIfAdError?: boolean

Whether the player should be blocked when an ad-related error occurs.


- A blocked player is not usable anymore. This has the same effect as invoking ChromelessPlayer.destroy.

false

contentProtection?: DRMConfiguration

Content protection configuration.

Content protection configuration.

Superseded by SourceConfiguration.contentProtection.

manifestMetadataTrack?: boolean

Whether segments in a HLS manifest should be represented by cues in a metadata text track.

Do not use this feature without consulting THEO Technologies.

Chromecast metadata configuration.


- Available since v2.21.0.

The muted autoplay policy.


- The muted autoplay policy is impacted by this property and PlayerConfiguration.mutedAutoplay.

'none'

playAdsAfterTime?: number

If set, only allow ads to play that are scheduled after this time.


- This setting is strictly after - e.g. setting playAdsAfterTime to 15 will cause the player to ignore an ad break scheduled to play at 15s.
- When scheduling a VMAP, it is required to set the AdSource type to vmap.

poster?: string

The poster of the media source.


- An empty string ('') clears the current poster.
- This poster has priority over ChromelessPlayer.poster.

streamType?: StreamType

The stream type.


- Available since 6.9.0.
- This is used as a hint for the player to show the correct UI while loading the stream, for example to avoid showing a seek bar when the stream is known in advance to be live.
- This is required for live and DVR streams when casting to Chromecast, in order for the Chromecast receiver to show the correct UI.

textTracks?: TextTrackDescription[]

List of text tracks to be side-loaded with the media source.


- A source change will reset side-loaded text tracks.

timeServer?: string

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


- The time server should return time in ISO-8601 format.
- Overrides the time server provided the DASH manifest's <UTCTiming>.
- All sources will use the time server. Alternatively, for one source use BaseSource.timeServer.

Virtual reality configuration.