AudioPlayer¶
Not yet Class
Used to play audio assets.
Not implemented yet
This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.
0 Nova members · 28 modern Roblox members not implemented yet
Description¶
AudioPlayer is used to play audio assets. It provides a single Output pin which can be connected to other pins via Wires.
Inheritance¶
Object → Instance → AudioPlayer
Properties¶
| Member | Signature | Summary |
|---|---|---|
Asset |
Asset: ContentId |
The asset to be loaded into the AudioPlayer. |
AssetId |
AssetId: string |
The asset to be loaded into the AudioPlayer. |
AssetRepresentation |
AssetRepresentation: AssetRepresentation |
— |
AudioContent |
AudioContent: Content |
The audio content to be loaded into the AudioPlayer. |
AutoLoad |
AutoLoad: bool |
Controls whether Asset loads automatically once assigned. |
AutoPlay |
AutoPlay: bool |
Denotes whether this AudioPlayer starts playing as soon as it spawns in for the first time. |
IsPlaying |
IsPlaying: bool |
Denotes whether this AudioPlayer is currently playing or planning to play. |
IsReady |
IsReady: bool |
Denotes whether this AudioPlayer is loaded, buffered, and ready to play. |
Looping |
Looping: bool |
Controls whether this AudioPlayer loops. |
LoopRegion |
LoopRegion: NumberRange |
A range, in seconds, denoting a desired loop start and loop end within the PlaybackRegion of this AudioPlayer. |
PlaybackRegion |
PlaybackRegion: NumberRange |
Range in seconds denoting a desired start time (minimum) and stop time (maximum) within the TimeLength. |
PlaybackSpeed |
PlaybackSpeed: double |
Controls how quickly the asset will be played, which controls its pitch. |
TimeLength |
TimeLength: double |
Denotes the length of the loaded asset. |
TimePosition |
TimePosition: double |
Tracks the current position of the playhead within the asset. |
Volume |
Volume: float |
Controls how loudly the asset will be played. |
Methods¶
| Member | Signature | Summary |
|---|---|---|
Cancel |
AudioPlayer:Cancel(actionId: int64?): bool |
Attempts to cancel a pre-planned future Play or Stop command. |
GetConnectedWires |
AudioPlayer:GetConnectedWires(pin: string): Instances |
Returns an array of Wires that are connected to the specified pin. |
GetInputPins |
AudioPlayer:GetInputPins(): Array |
Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its [Wire.TargetInstance](Wire.md#targetinsta… |
GetOutputPins |
AudioPlayer:GetOutputPins(): Array |
Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its [Wire.SourceInstance](Wire.md#sourceinsta… |
GetWaveformAsync |
AudioPlayer:GetWaveformAsync(timeRange: NumberRange, samples: int): Array |
Returns a sampling of the waveform data for the loaded Asset. |
Play |
AudioPlayer:Play(atTime: double?): int64? |
Plays the AudioPlayer from wherever its TimePosition is. |
Stop |
AudioPlayer:Stop(atTime: double?): int64? |
Stops the AudioPlayer wherever its TimePosition is. |
Events¶
| Member | Signature | Summary |
|---|---|---|
Ended |
Ended() |
Fires when the AudioPlayer has completed playback and stopped. |
Looped |
Looped() |
Fires when the AudioPlayer loops. |
WiringChanged |
WiringChanged(connected: bool, pin: string, wire: Wire, instance: Instance) |
Fires when another instance is connected to or disconnected from the AudioPlayer via a Wire. |
Roblox reference: AudioPlayer
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.