An asynchronous player created by aukit.player.
More...
|
| number | livePosition () |
| | Returns the estimated current position of audio playback.
|
|
| pause () |
| | Pauses the player if it's playing.
|
|
| play () |
| | Plays the audio if it's paused.
|
| | seek (number pos) |
| | Seeks the current audio playback position. If the requested position isn't loaded yet, the player will hang until the audio is loaded. (If the position is out of bounds, the player will not continue.).
|
| | setVolume (number vol) |
| | Sets the volume of playback. If HDR mode is enabled, this must be between 0 and 1; otherwise, it may be between 0 and 3.
|
|
❴ playAudio→ | fun (samples→ number❲❳‚ volume?→ number) ❵❲❳ speakers |
| | The speakers the audio is playing on.
|
|
| stop () |
| | Stops the audio playback. This kills all tasks and invalidates the player.
|
|
|
boolean | hdr |
| | Whether the player is using HDR mode.
|
|
boolean | invalidate |
| | Internal flag to invalidate current chunk.
|
|
boolean | isPaused |
| | Whether the player is paused.
|
|
❴ pos→ number‚ time→ number ❵ | lastPlayback |
| | Internal playback positions for pausing.
|
|
Task | loaderTask |
| | The task that is loading the audio.
|
|
Task | playerTask |
| | The task that is playing the audio.
|
|
number | position |
| | The current position of the audio, in seconds.
|
|
number | volume |
| | The volume of the audio.
|
An asynchronous player created by aukit.player.
◆ livePosition()
| number aukit::Player::livePosition |
( |
| ) |
|
Returns the estimated current position of audio playback.
- Returns
- (number) The position of the audio‚ in seconds
◆ seek()
| aukit::Player::seek |
( |
number | pos | ) |
|
Seeks the current audio playback position. If the requested position isn't loaded yet, the player will hang until the audio is loaded. (If the position is out of bounds, the player will not continue.).
- Parameters
-
| pos | (number) The position to seek to, in seconds |
◆ setVolume()
| aukit::Player::setVolume |
( |
number | vol | ) |
|
Sets the volume of playback. If HDR mode is enabled, this must be between 0 and 1; otherwise, it may be between 0 and 3.
- Parameters
-
| vol | (number) The volume to set |
The documentation for this class was generated from the following file: