Class: AudioFilePlayer

AudioFilePlayer(audioContext, audioFile)

An audio file player.

Constructor

new AudioFilePlayer(audioContext, audioFile)

Create an audio file player.
Parameters:
Name Type Description
audioContext Object An AudioContext.
audioFile Object The audio file to play.
Author:
  • Lawrence Fyfe
Source:

Methods

endPlayer()

This is called when buffer playback has eneded.
Source:

(async) isReady() → {Promise}

Is this player ready to play?
Source:
Returns:
A promise that resolves when this player has decoded its audio file.
Type
Promise

pause()

Pause.
Source:

play()

Play.
Source:

setTimeRange(start, stop)

Sets the specified time range for the BufferPlayer.
Parameters:
Name Type Description
start number The start time.
stop number The end time.
Source:

skip(time)

Skip to the specified time.
Parameters:
Name Type Description
time number The time to skip to.
Source:

stop()

Stop.
Source: