Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Server Entity Scripts • Assignment Client Scripts
Plays or "injects" the content of an audio file.Create using Audio API methods.
Properties
Name | Type | Summary |
---|---|---|
playing | boolean |
|
loudness | number |
The loudness in the last frame of audio, range |
options | AudioInjector.AudioInjectorOptions |
Configures how the injector plays the audio. |
Constructor |
---|
new AudioInjector( )
|
Methods
Name | Return Value | Summary |
---|---|---|
getLoudness
|
number |
Gets the loudness of the most recent frame of audio played. |
getOptions
|
AudioInjector.AudioInjectorOptions |
Gets the current configuration of the audio injector. |
isPlaying
|
boolean |
Gets whether or not the audio is currently playing. |
restart
|
None |
Stops current playback, if any, and starts playing from the beginning. |
setOptions
|
None |
Configures how the injector plays the audio. |
stop
|
None |
Stops audio playback. |
Signals
Name | Summary |
---|---|
finished
|
Triggered when the audio has finished playing. |
Type Definitions
AudioInjectorOptions Type: object |
|||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Configures where and how an audio injector plays its audio. Properties
|
Method Details
(static) getLoudness( ) → {number}
Returns: The loudness of the most recent frame of audio played, range 0.0 – 1.0 .
|
---|
Gets the loudness of the most recent frame of audio played. |
(static) getOptions( ) → {AudioInjector.AudioInjectorOptions}
Returns: Configuration of how the injector plays the audio. |
---|
Gets the current configuration of the audio injector. |
(static) isPlaying( ) → {boolean}
Returns: true if the audio is currently playing, otherwise false .
|
---|
Gets whether or not the audio is currently playing. Example
|
(static) restart( ) |
---|
Stops current playback, if any, and starts playing from the beginning. |
(static) setOptions( options ) | ||||||
---|---|---|---|---|---|---|
Configures how the injector plays the audio. Parameters
|
(static) stop( ) |
---|
Stops audio playback. Example
|
Signal Details
finished(
)
Returns: Signal |
---|
Triggered when the audio has finished playing. Example
|