API Docs for:
Show:

VideoPlayerHTML5 Class

HTML5 video player impelmentation for HbbTV 2.0.1 capable devices

Constructor

VideoPlayerHTML5

()

Methods

createPlayer

()

Creates player component and sets up event listeners Basic version is left empty and inherited players must define this method for all different players creation

displayPlayer

(
  • sec.
)

Displays player over video. Player shows current play position, duration and buttons that can be used

Parameters:

  • sec. Int

    seconds player is displayed on screen and hidden after. If sec is not defined player remains on screen and is not hidden.

isVisible

()

returns true if player is visible

navigate

(
  • key.
)

Handles navigation during video playback. This super class method may be re-defined on inherited class

Parameters:

  • key. Int

    keycode of pressed key. Keycodes are defined in keycodes.js file

pause

()

Pause video playback and display player on screen

populate

()

Basic video player populate method to initialize player html elements ready for setting up

setAdBreaks

(
  • breaks.
)

Parameters:

  • breaks. Object

    Sets ad break positions, and ad amount to be requested as a list of objects with needed attributes

setDisplay

(
  • container.
)

Parameters:

  • container. HTML Element

    Container for video display. Video will be set inside the container

setDRM

(
  • system.
  • la_url.
)

Parameters:

  • system. String

    Specifies DRM system to be used as a string value (for example playeready or marlin)

  • la_url. String

    DRM lisence url

setFullscreen

(
  • fs.
)

Parameters:

  • fs. Bool

    Set video fullscreen if true, and to the active asset box if false

setLoading

(
  • loading.
  • reason.
)

Parameters:

  • loading. Bool

    Sets player's loading indicator visible if true, and hides if false

  • reason. String

    logs reason for loading if specified

setSubtitles

(
  • subtitles.
)

Parameters:

  • subtitles. Object

    Creates HTML track objects for Out-Of-Band subtitle files

updateProgressBar

()

Updates progress bar. Progress bar is only visible when player UI is displayed, but it is always updated non-visible when this method is called