logo
THEOplayer
ChromelessPlayerfeaturesMultiViewPlayerPlayerPlayerListplayersPlayerConfigurationplayerSuiteVersionversiontheoplayer
ABR
Media and Text Tracks
Ads
Caching
Player
Events
Content protection
Analytics
Casting
Miscellaneous
Verizon Media
Source
HESP
Network
SSAI
Presentation
UI
VR

THEOplayer > PlayerConfiguration

PlayerConfiguration interface

Describes a player's configuration.

Signature:

export interface PlayerConfiguration 

Properties

Property

Type

Description

abr (optional)

SourceAbrConfiguration

The player's ABR configuration.

ads (optional)

AdsConfiguration

The ads configuration for the player.

allowMixedContent (optional)

boolean

Whether mixed HTTP/HTTPS content is allowed.

allowNativeFullscreen (optional)

boolean

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

analytics (optional)

AnalyticsDescription[]

List of analytics configurations for the player.

cast (optional)

CastConfiguration

The cast configuration for the player.

hideDeprecationWarnings (optional)

boolean

If set, hides all deprecation warnings.

hlsDateRange (optional)

boolean

Whether date ranges will be parsed from HLS manifests.

isEmbeddable (optional)

boolean

Whether THEOplayer will be used in an iframe.

libraryLocation (optional)

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.

license (optional)

string

The license for the player

licenseUrl (optional)

string

The url to fetch the license for the player

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.

mutedAutoplay (optional)

MutedAutoplayConfiguration

The muted autoplay policy.

persistVolume (optional)

boolean

Whether volume preferences will be persisted across player sessions.

retainPlaybackRateOnSourceChange (optional)

boolean

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

retryConfiguration (optional)

RetryConfiguration

The retry configuration for the player.

verizonMedia (optional)

VerizonMediaConfiguration

The Verizon Media configuration for the player.

vr (optional)

VRPlayerConfiguration

The vr configuration for the player.

Property Details

abr

The player's ABR configuration.

Signature:

abr?: SourceAbrConfiguration;

Remarks


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

ads

The ads configuration for the player.

Signature:

ads?: AdsConfiguration;

allowMixedContent

Whether mixed HTTP/HTTPS content is allowed.

Signature:

allowMixedContent?: boolean;

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.

allowNativeFullscreen

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

Signature:

allowNativeFullscreen?: boolean;

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.

analytics

List of analytics configurations for the player.

Signature:

analytics?: AnalyticsDescription[];

Remarks

Multiple integrations can be enabled at once.

cast

The cast configuration for the player.

Signature:

cast?: CastConfiguration;

hideDeprecationWarnings

If set, hides all deprecation warnings.

Signature:

hideDeprecationWarnings?: boolean;

Remarks


- Available since v5.5.0.

hlsDateRange

Whether date ranges will be parsed from HLS manifests.

Signature:

hlsDateRange?: boolean;

Remarks

Available since 2.61.

isEmbeddable

Whether THEOplayer will be used in an iframe.

Signature:

isEmbeddable?: boolean;

libraryLocation

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

Signature:

libraryLocation?: string;

Remarks


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

Example

'/lib/theoplayer/'

license

The license for the player

Signature:

license?: string;

licenseUrl

The url to fetch the license for the player

Signature:

licenseUrl?: string;

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.

mutedAutoplay

The muted autoplay policy.

Signature:

mutedAutoplay?: MutedAutoplayConfiguration;

Remarks


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

persistVolume

Whether volume preferences will be persisted across player sessions.

Signature:

persistVolume?: boolean;

Remarks

Available since 2.27.0.

retainPlaybackRateOnSourceChange

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

Signature:

retainPlaybackRateOnSourceChange?: boolean;

retryConfiguration

The retry configuration for the player.

Signature:

retryConfiguration?: RetryConfiguration;

verizonMedia

The Verizon Media configuration for the player.

Signature:

verizonMedia?: VerizonMediaConfiguration;

vr

The vr configuration for the player.

Signature:

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