Playlist

Playlist

Audio playlist controller

Constructor

new Playlist(audionon-null, datanon-null, noInitopt, volumeopt)

Create the positional audio instance
Parameters:
Name Type Attributes Default Description
audio AudioController The Audio controller instance
data AudioPlayListData Array of audio JSON objects
noInit boolean <optional>
false Skip automatic initialization
volume number <optional>
1 The default volume

Classes

Playlist

Members

currentIndex :number

The current playlist index
Type:
  • number

(constant, non-null) items :Array.<!Fragment>

The instantiated audio Fragments
Type:

(constant) next :function

Bound next track function
Type:
  • function

playing :boolean

Currently playing state
Type:
  • boolean

Methods

(async) goto(i)

Go to track index
Parameters:
Name Type Description
i number Track index

next()

Next track

play()

Start playing

prev()

Previous track

stop(noResetopt)

Stop playing
Parameters:
Name Type Attributes Default Description
noReset boolean <optional>
false