Member Summary
Private Members | ||
private |
audioBuffer: * Private object to hold AudioBuffer node. |
|
private |
audioSource: * Private object to hold AudioBufferSourceNode node. |
Method Summary
Public Methods | ||
public |
Returns if the audioBuffer has been created and loaded, or not. |
|
public |
Return if audioSource has been created, or not. |
|
public |
|
|
public |
|
|
public |
Get an audio stream from an URL. |
|
public |
pause() |
|
public |
play() Start audio playback of that what is in the buffer. |
|
public |
stop() Stop playback of audio. |
Inherited Summary
From class AudioContext | ||
public |
Private object to hold AudioContext node. |
|
public |
This will be the error function. |
|
public |
This will be the log function. |
|
private |
Keep a list of all registered event listeners. |
|
public |
addEventListener(args: ...*) Wraps the addEventListener which is available on the AudioContext node. |
|
public |
Get the audio context or create one. |
|
public |
Use this method to conveniently fire an event. |
|
public |
|
|
public |
removeEventListener(args: ...*) Wraps the removeEventListener which is available on the AudioContext node. |
|
public |
Resume a suspended AudioContext. |
|
public |
Suspend the AudioContext to preserve power and such. |
Private Members
Public Methods
public audioBufferExists(): boolean source
Returns if the audioBuffer has been created and loaded, or not.
public createBufferSource() source
public disconnectBufferSource() source
public async load(url: string, withItslToken: boolean) source
Get an audio stream from an URL.
If the withItslToken is provided (and set to true) use the authorizedRequest method to load the audio. This in effect will set the ITSLanguage bearer token (if available) to the request.
For both request methods goes: there's no check whether you're trying to load from ITSLanguage backend system or not.