# Interface: THEOCorePlayer

# Hierarchy

# Table of contents

# Properties

# Accessors

# Methods

# Properties

# ads

ads: PlayerAds

# Inherited from

PixellotPlayerCore.ads


# analytics

analytics: PlayerAnalytics

# Inherited from

PixellotPlayerCore.analytics


# id

id: string | number

# Inherited from

PixellotPlayerCore.id


# theoPlayer

Optional theoPlayer: any

# Inherited from

PixellotPlayerCore.theoPlayer


# vdjsPlayer

Optional vdjsPlayer: any

# Inherited from

PixellotPlayerCore.vdjsPlayer

# Accessors

# autoplay

get autoplay(): boolean

Gets or sets autoplay for player

player.autoplay = true // sets player into autoplay mode

# Returns

boolean

# Inherited from

PixellotPlayerCore.autoplay

set autoplay(value): void

Gets or sets autoplay for player

player.autoplay = true // sets player into autoplay mode

# Parameters

Name Type
value boolean

# Returns

void

# Inherited from

PixellotPlayerCore.autoplay


# controls

get controls(): boolean

Gets or sets showing player controls

  • The state of showing controls
// get
const isControlsShown = player.controls;
// set
player.controls = false; // Hide player controls

# Returns

boolean

# Inherited from

PixellotPlayerCore.controls

set controls(value): void

Gets or sets showing player controls

  • The state of showing controls
// get
const isControlsShown = player.controls;
// set
player.controls = false; // Hide player controls

# Parameters

Name Type
value boolean

# Returns

void

# Inherited from

PixellotPlayerCore.controls


# currentTime

get currentTime(): number

Gets or sets the current time (in seconds)

# Returns

number

# Inherited from

PixellotPlayerCore.currentTime

set currentTime(value): void

Gets or sets the current time (in seconds)

# Parameters

Name Type
value number

# Returns

void

# Inherited from

PixellotPlayerCore.currentTime


# duration

get duration(): number

Returns video duration Normally gets the length in time of the video in seconds;

The duration of the video in seconds

player.duration; // prints current video duration.

# Returns

number

# Inherited from

PixellotPlayerCore.duration


# element

get element(): HTMLElement

# Returns

HTMLElement

# Inherited from

PixellotPlayerCore.element


# hasStarted

get hasStarted(): boolean

Returns true if video playback has been started, otherwise false

const isLive = player.isLive();

# Returns

boolean

# Inherited from

PixellotPlayerCore.hasStarted


# isFullscreen

get isFullscreen(): boolean

Returns true if player is in fullscreen mode, false otherwise

# Returns

boolean

# Inherited from

PixellotPlayerCore.isFullscreen


# isLive

get isLive(): boolean

Returns true if player in live mode, false otherwise

# Returns

boolean

# Inherited from

PixellotPlayerCore.isLive


# isMuted

get isMuted(): boolean

Returns true if player is muted, false otherwise

# Returns

boolean

# Inherited from

PixellotPlayerCore.isMuted


# isPaused

get isPaused(): boolean

Returns true if player is paused, false otherwise

# Returns

boolean

# Inherited from

PixellotPlayerCore.isPaused


# poster

get poster(): string

Gets or sets the poster image source url

# Returns

string

# Inherited from

PixellotPlayerCore.poster

set poster(src): void

Gets or sets the poster image source url

# Parameters

Name Type
src string

# Returns

void

# Inherited from

PixellotPlayerCore.poster


# readyState

get readyState(): READY_STATE

Returns player's readyState property which indicates the readiness state of the media.

More info: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState

const readyState = player.readyState;

# Returns

READY_STATE

# Inherited from

PixellotPlayerCore.readyState


# rootElement

get rootElement(): HTMLElement

Returns video duration Normally gets the length in time of the video in seconds;

  • The duration of the video in seconds when getting
player.getDuration();

# Returns

HTMLElement

# Inherited from

PixellotPlayerCore.rootElement


# src

get src(): string

Get or set the video source. This method will set source explicitly to the core video player, so you may miss some of Player SDK features (like pano for eg.).

# Returns

string

# Inherited from

PixellotPlayerCore.src

set src(src): void

Get or set the video source. This method will set source explicitly to the core video player, so you may miss some of Player SDK features (like pano for eg.).

# Parameters

Name Type
src string

# Returns

void

# Inherited from

PixellotPlayerCore.src


# userActive

get userActive(): boolean

# Returns

boolean

# Inherited from

PixellotPlayerCore.userActive

set userActive(state): void

# Parameters

Name Type
state boolean

# Returns

void

# Inherited from

PixellotPlayerCore.userActive


# videoElement

get videoElement(): null | HTMLVideoElement

# Returns

null | HTMLVideoElement

# Inherited from

PixellotPlayerCore.videoElement


# videoHeight

get videoHeight(): number

# Returns

number

# Inherited from

PixellotPlayerCore.videoHeight


# videoWidth

get videoWidth(): number

# Returns

number

# Inherited from

PixellotPlayerCore.videoWidth


# volume

get volume(): number

Gets or sets current volume of the media

  • The current volume as a percent when getting
// get
const currentVolume = player.volume;
// set
player.volume = 0.5; // Set volume to half

# Returns

number

# Inherited from

PixellotPlayerCore.volume

set volume(value): void

Gets or sets current volume of the media

  • The current volume as a percent when getting
// get
const currentVolume = player.volume;
// set
player.volume = 0.5; // Set volume to half

# Parameters

Name Type
value number

# Returns

void

# Inherited from

PixellotPlayerCore.volume

# Methods

# destroy

destroy(): void

Destroys the video player and does any necessary cleanup

player.destroy();

# Returns

void

# Inherited from

PixellotPlayerCore.destroy


# exitFullscreen

exitFullscreen(): void

Return the video to its normal size after having been in full screen mode

player.exitFullscreen();

# Returns

void

# Inherited from

PixellotPlayerCore.exitFullscreen


# pause

pause(): Promise<void>

Pauses video playback

player.pause();

# Returns

Promise<void>

# Inherited from

PixellotPlayerCore.pause


# play

play(): Promise<void>

Starts playing video playback

player.play();

# Returns

Promise<void>

# Inherited from

PixellotPlayerCore.play


# requestFullscreen

requestFullscreen(): void

Increase the size of the video to full screen

player.requestFullscreen();

# Returns

void

# Inherited from

PixellotPlayerCore.requestFullscreen


# setNextSrc

setNextSrc(source): void

# Parameters

Name Type
source PlayerNextSource

# Returns

void


# setSharing

setSharing(sharing): void

# Parameters

Name Type
sharing null | { url: string }

# Returns

void


# stop

stop(): void

Stops media playback and resets player

player.stop();

# Returns

void

# Inherited from

PixellotPlayerCore.stop