Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Track<TM>

Track instance of the raw track

Type parameters

  • TM: object = {}

Hierarchy

  • Track

Index

Constructors

constructor

Accessors

pausedDuration

  • get pausedDuration(): number
  • The paused duration of the track (if playing and paused atleast once)

    Returns number

playbackDuration

  • get playbackDuration(): number

sourceType

  • get sourceType(): number

urlOrLocation

  • get urlOrLocation(): string

Methods

addPausedTimestamp

  • addPausedTimestamp(timestamp: number): void
  • Add a pause timestamp when track is paused

    Parameters

    • timestamp: number

      The timestamp when the track is paused

    Returns void

addUnpausedTimestamp

  • addUnpausedTimestamp(timestamp: number): void
  • Add a unpause timestamp when track is unpaused

    Parameters

    • timestamp: number

      The timestamp when the track is unpaused

    Returns void

cleanup

  • cleanup(): void

get

  • get<K>(key: K): TM[K]
  • Get value of a track metadata property

    Type parameters

    • K: string | number | symbol

    Parameters

    • key: K

      The metadata property key

    Returns TM[K]

    The metadata property value

set

  • set<K, V>(key: K, value: V): void
  • Set a value to a track metadata property

    Type parameters

    • K: string | number | symbol

    • V

    Parameters

    • key: K

      The metadata property key

    • value: V

      The metadata property value to set

    Returns void

setPlayer

Generated using TypeDoc