Skip to main content

Timeline

The timeline used to coordinate time and progress of different tracks It do not has a length, so you should manually stop it when everything is finished.

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

tracks

tracks: { priority: number; track: Track }[] = []

Accessors

playing

  • get playing(): boolean
  • Get the current progress of the timeline


    Returns boolean

time

  • get time(): number
  • set time(value: number): void
  • Get the current progress of the timeline


    Returns number

  • Set the current progress of the timeline, seek the timeline


    Parameters

    • value: number

    Returns void

Methods

addTrack

  • addTrack(track: Track, priority?: number): void
  • Add a track to the timeline


    Parameters

    • track: Track
    • priority: number = 0

    Returns void

isStuck

  • isStuck(): boolean
  • Is the timeline stuck by one of its track


    Returns boolean

pause

  • pause(): void
  • Pause the timeline


    Returns void

play

  • play(): void
  • Play the timeline


    Returns void