Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PlayerDecorator

Index

Constructors

constructor

  • Parameters

    • player: any

      Player instance that is saved to this.player for further usage

    Returns PlayerDecorator

Properties

Protected player

player: any

Methods

Abstract changePlaybackRate

  • changePlaybackRate(rate: number): void
  • Should set the playback speed of the player. Slow motion is used by values between 0 and 1, fast forward by values greater than 1.

    Parameters

    • rate: number

      A playback rate greater than 0

    Returns void

Abstract fastSeekToPosition

  • fastSeekToPosition(position: number): void
  • Should seek to the given playback time specified by the parameter time in milliseconds.

    Parameters

    • position: number

      The position to seek to in ms

    Returns void

Abstract getCurrentPosition

  • getCurrentPosition(): number
  • Should return the current playback time in milliseconds.

    Returns number

getLiveEdgePosition

  • getLiveEdgePosition(): null | number
  • Should return the current live edge time in milliseconds, i.e. maximum reachable position by the player. Only for live streams.

    default

    null

    Returns null | number

Abstract getPlaybackRate

  • getPlaybackRate(): number
  • Should return the current playback speed of the player. 1 is the default playback speed, values between 0 and 1 refer to slow motion and values greater than 1 refer to fast forward.

    Returns number

getPlaybackRateLimits

  • getPlaybackRateLimits(): { max: number; min: number }
  • Defines the playback rate adjustments limit, i.e what min and max playback rate values can be used while syncing.

    default

    { min: 0.25, max: 2 }

    Returns { max: number; min: number }

    • max: number
    • min: number

getPrecisionThreshold

  • getPrecisionThreshold(): number
  • Defines the synchronization threshold in milliseconds, i.e what delta counts as 100% synchronization. Default is 25ms.

    default

    25

    Returns number

getSeekThreshold

  • getSeekThreshold(): number
  • Defines the seeking threshold in milliseconds, i.e delta's upper bound when to stop playback rate manipulations and use seek if PlayerDecorator.isSeekable returns true.

    default

    20000

    Returns number

Abstract isPlaying

  • isPlaying(): boolean
  • Should return true if the player is currently playing, i.e. has started and is not paused.

    Returns boolean

isSeekable

  • isSeekable(): boolean
  • Should indicate if seeking is possible or not, i.e only playback rate manipulations should be used for syncing. Default is true.

    default

    true

    Returns boolean

isStalled

  • isStalled(): boolean
  • Should return true if the player is currently stalling due to an empty buffer.

    default

    false

    Returns boolean

load

  • load(): void

Abstract mute

  • mute(): void
  • Should mute player.

    Returns void

Abstract pause

  • pause(): void
  • Should pause playback.

    Returns void

Abstract play

  • play(): void
  • Should start playback.

    Returns void

Abstract setVolume

  • setVolume(volume: number): void
  • Should set the player’s volume in the range of 0 (silent) to 1 (max volume). Should unmute a muted player.

    Parameters

    • volume: number

      The volume to set between 0 and 1

    Returns void

unload

  • unload(): void

Abstract unmute

  • unmute(): void
  • Should unmute player.

    Returns void