Options
All
  • Public
  • Public/Protected
  • All
Menu

Play/pause element.

description

This class controls the state of the media, by playing or pausing it, and when it ends, updates the state to replay the current media.

see

https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/cross_browser_video_player#PlayPause

class

Play

implements

PlayerComponent

Hierarchy

  • Play

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

Properties

Private button

button: HTMLButtonElement

Button to play/pause media.

type

HTMLButtonElement

memberof

Play

Private player

player: Player

Instance of OpenPlayer.

type

Player

memberof

Play

Methods

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

Object literals

Private events

events: object

Events that will be triggered in Play element:

  • controls (when controlschanged event is being triggered)
  • media (to toggle button's class and play/pause media)
see

Controls._buildElements

type

EventsList

memberof

Play

controls

controls: object

Type declaration

media

media: object

Type declaration

Generated using TypeDoc