Skip to content

AudioPlaylist: methods

Evandro Leopoldino Gonçalves edited this page Apr 2, 2022 · 4 revisions
  • playlist.play(): void
    Starts to play first audio as soon as the first audio is loaded. Once the audio has finished playing, automatically it starts to play the next one.

  • playlist.next(): void
    Stops the current audio and starts playing the next one based in the list provided in the AudioPlaylist instance. In case the current audio is the last in the list, it starts playing the first one.

  • playlist.prev(): void
    Stops the current audio and starts playing the previous one based in the list provided in the AudioPlaylist instance. In case the current audio is the first in the list, it starts playing the last one.

  • playlist.pause(): void
    Pauses the Playlist and can be played again from the previous position by calling the play method.

  • playlist.toggle(): void
    Plays or pause the current audio.

  • playlist.stop(): void
    Stops playback immediately.

Clone this wiki locally