Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Controls

Controls element.

description

This class handles the creation/destruction of all player's control elements.

class

Controls

implements

PlayerComponent

Hierarchy

  • Controls

Implements

Index

Constructors

constructor

Properties

captions

captions: Captions

Instance of Captions object.

type

Captions

memberof

Controls

Private controls

controls: HTMLDivElement

Main container of control elements.

type

HTMLDivElement

memberof

Controls

fullscreen

fullscreen: Fullscreen

Instance of Fullscreen object.

type

Fullscreen

memberof

Controls

Private items

items: any[]

Storage for all the control elements.

type

any[]

memberof

Controls

play

play: Play

Instance of Play object.

type

Play

memberof

Controls

Private player

player: Player

Instance of OpenPlayer.

type

Player

memberof

Controls

progress

progress: Progress

Instance of Progress object.

type

Progress

memberof

Controls

settings

settings: Settings

Instance of Settings object.

type

Settings

memberof

Controls

time

time: Time

Instance of Time object.

type

Time

memberof

Controls

timer

timer: number

Element that stores the time to hide controls.

type

number

memberof

Controls

volume

volume: Volume

Instance of Volume object.

type

Volume

memberof

Controls

Methods

Private _buildElements

  • _buildElements(): void
  • Create markup for all control elements and, if available, create entries for Settings element.

    It will dispatch a controlschanged event to reload all elements in the control bar.

    see

    Settings.addItem

    see

    Settings.addSettings

    memberof

    Controls

    Returns void

Private _setElements

  • _setElements(): void
  • Instantiate all control elements' classes and store them in items element.

    see

    Controls.items

    memberof

    Controls

    Returns void

Private _startControlTimer

  • _startControlTimer(time: number): void
  • Set timer to hide controls.

    memberof

    Controls

    Parameters

    • time: number

      The time when controls will be hidden in milliseconds (ms).

    Returns void

Private _stopControlTimer

  • _stopControlTimer(): void
  • Stop timer to hide controls.

    memberof

    Controls

    Returns void

create

  • create(): void
  • Create HTML and insert it into OpenPlayer's DOM.

    This method must include its events setup.

    memberof

    PlayerComponent

    Returns void

destroy

  • destroy(): void
  • Remove HTML associated to specific OpenPlayer's element.

    This method must include the removal of its previously set events.

    memberof

    PlayerComponent

    Returns void

getContainer

  • getContainer(): HTMLDivElement
  • Retrieve the main container of all control elements, to add/remove them in latter steps.

    memberof

    Controls

    Returns HTMLDivElement

Object literals

Private events

events: object

Events that will be triggered in Controls element:

  • mouse (to show/hide controls after specific number of seconds)
  • media (to trigger/stop timer that will hide or show controls)
type

EventsList

memberof

Controls

media

media: object

Type declaration

mouse

mouse: object

Type declaration

Generated using TypeDoc