Version: 2.67.0

ChromelessPlayer

THEOplayer > ChromelessPlayer

ChromelessPlayer class

The player API.

Signature:
export declare class ChromelessPlayer implements EventDispatcher<PlayerEventMap>

Constructors

Properties

Property

Type

Description

abr

ABRConfiguration

The adaptive bitrate configuration.

ads

Ads

The ads API.

analytics

Analytics

The analytics API.

audio

WebAudio

The web audio API.

audioTracks

MediaTrackList

List of audio tracks of the current source.

autoplay

boolean

Whether the player should immediately start playback after source change.

buffered

TimeRanges

Returns a TimeRanges object that represents the ranges of the media resource that the player has buffered.

canvas

Canvas

The canvas of the player.

cast

Cast

The cast API.

clip

Clip

The clip API.

currentProgramDateTime

Date

The current playback position of the media, as a timestamp.

currentTime

number

The current playback position of the media, in seconds.

duration

number

The duration of the media, in seconds.

element

HTMLElement

The HTML element containing the player.

ended

boolean

Whether playback of the media is ended.

error

MediaError

The last error that occurred for the current source, if any.

imagine

Imagine

The Imagine API.

loop

boolean

Whether playback of the media is looped.

metrics

Metrics

The metrics API.

muted

boolean

Whether audio is muted.

network

Network

The network API.

paused

boolean

Whether the player is paused.

playbackRate

number

The playback rate of the media.

played

TimeRanges

Returns a TimeRanges object that represents the ranges of the media resource that the player has played.

poster

string

The poster of the current source.

preload

PreloadType

The preload setting of the player.

presentation

Presentation

The presentation API.

readyState

number

The ready state of the player, represented by a value from the following list:
- 0 (HAVE_NOTHING): The player has no information about the duration of its source.
- 1 (HAVE_METADATA): The player has information about the duration of its source.
- 2 (HAVE_CURRENT_DATA): The player has its current frame in its buffer.
- 3 (HAVE_FUTURE_DATA): The player has enough data for immediate playback.
- 4 (HAVE_ENOUGH_DATA): The player has enough data for continuous playback.

related

RelatedContent

The related content API.

seekable

TimeRanges

Returns a TimeRanges object that represents the ranges of the media resource that are seekable by the player.

seeking

boolean

Whether the player is seeking.

source

SourceDescription

The current source which describes desired playback of a media resource.

src

string &#124; undefined

The current URL of the media resource.

textTracks

TextTracksList

List of text tracks of the current source.

textTrackStyle

TextTrackStyle

The text track style API.

uid

number

Unique ID of the player.

verizonMedia

VerizonMedia

The Verizon Media API.

videoHeight

number

The height of the active video rendition, in pixels.

videoTracks

MediaTrackList

List of video tracks of the current source.

videoWidth

number

The width of the active video rendition, in pixels.

visibility

Visibility

The visibility API.

volume

number

The volume of the audio.

vr

VR

The VR API.

yospace

Yospace

The Yospace API.

Methods

Method

Description

addEventListener(type, listener)

destroy()

Destroy the player.

pause()

Pause playback.

play()

Start or resume playback.

prepareWithUserAction()

Prepare the player to ChromelessPlayer.autoplay on platforms where autoplay is restricted without user action.

removeEventListener(type, listener)

setSource(sourceDescription)

Set current source which describes desired playback of a media resource.

stop()

Stop playback.