Options
All
  • Public
  • Public/Protected
  • All
Menu

Time element.

description

Class that renders media's current time and duration in human-readable format (hh:mm:ss), and if media is a live streaming, a Live Broadcast message will be displayed.

see

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime

see

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/duration

class

Time

implements

PlayerComponent

Hierarchy

  • Time

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

Properties

Private current

current: HTMLTimeElement

Element that displays media's current time being played.

It will change to Live Broadcast if duration is Infinity.

type

{HTMLTimeElement}

memberof

Time

Private delimiter

delimiter: HTMLSpanElement

Element that separates current time and duration labels.

It will be hidden if duration is Infinity.

type

{HTMLSpanElement}

memberof

Time

Private duration

duration: HTMLTimeElement

Element that displays media's total duration.

It will be hidden if duration is Infinity.

type

{HTMLTimeElement}

memberof

Time

Private player

player: Player

Instance of OpenPlayer.

type

Player

memberof

Time

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 Time element:

  • controls (to reset time properly when controlschanged event is triggered).
  • media (to set current time and duration in loadedmetadata, progress and timeupdate events).
type

EventsList

memberof

Time

controls

controls: object

Type declaration

media

media: object

Type declaration

Generated using TypeDoc