Interface PlayerConfiguration

Describes a player's configuration.

interface PlayerConfiguration {
    abr?: SourceAbrConfiguration;
    ads?: AdsConfiguration;
    allowMixedContent?: boolean;
    allowNativeFullscreen?: boolean;
    analytics?: AnalyticsDescription[];
    cast?: CastConfiguration;
    hlsDateRange?: boolean;
    isEmbeddable?: boolean;
    libraryLocation?: string;
    license?: string;
    licenseUrl?: string;
    liveOffset?: number;
    mutedAutoplay?: MutedAutoplayConfiguration;
    persistVolume?: boolean;
    retainPlaybackRateOnSourceChange?: boolean;
    verizonMedia?: VerizonMediaConfiguration;
    vr?: VRPlayerConfiguration;
}

Hierarchy (view full)

Properties

The player's ABR configuration.

Remarks


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

The ads configuration for the player.

allowMixedContent?: boolean

Whether mixed HTTP/HTTPS content is allowed.

Remarks


- Available since 2.22.0.
- By default, the player assumes that it cannot load HTTP URLs when inside a HTTPS page because of mixed content restrictions. Therefore, the player will automatically convert HTTP URLs to HTTPS before loading them.
- When this option is set to true, the player may assume that mixed content is allowed on the current platform, and will not automatically convert HTTP URLs to HTTPS.

Default Value

false

allowNativeFullscreen?: boolean

Whether the native video element's fullscreen should be used whenever THEOplayer's fullscreen is unsupported.

Remarks


- Available since 2.21.0.
- It should be considered for older Android devices and iOS.
- It is limited to the platform's controls, custom UI and interactions are not possible.
- Together with the Google IMA integration, media preloading is unavailable on iOS devices.
- Together with the Google IMA integration, the current time is set to the live point when returning to the content after an ad.

Default Value

false

analytics?: AnalyticsDescription[]

List of analytics configurations for the player.

Remarks

Multiple integrations can be enabled at once.

The cast configuration for the player.

hlsDateRange?: boolean

Whether date ranges will be parsed from HLS manifests.

Remarks

Available since 2.61.

Default Value

false

isEmbeddable?: boolean

Whether THEOplayer will be used in an iframe.

Default Value

false

libraryLocation?: string

The directory in which the THEOplayer library worker files are located. These worker files are theoplayer.d.js, theoplayer.e.js, theoplayer.p.js.

Remarks


- This parameter is required when using a HLS source and has no default.

Example

`'/lib/theoplayer/'`
license?: string

The license for the player

licenseUrl?: string

The url to fetch the license for the player

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 target duration of a segment, as specified by the manifest.

The muted autoplay policy.

Remarks


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

Default Value

'none'.

persistVolume?: boolean

Whether volume preferences will be persisted across player sessions.

Remarks

Available since 2.27.0.

Default Value

false

retainPlaybackRateOnSourceChange?: boolean

Whether playbackRate is retained across sources. When false, playbackRate will be reset to 1 on each source change. Defaults to false.

The Verizon Media configuration for the player.

The vr configuration for the player.

Generated using TypeDoc