An AudioTrack object serves as a real-time agent that continuously fetches audio signals from an AudioStream and plays them. While AudioStream objects provide audio signals, it's the AudioTrack objects residing within an AudioPlayer that actually play them.
AudioTracks are created using the AudioPlayer's asyncAddTrack method.
While active, AudioTracks continuously retrieve audio signals from their associated AudioStream, playing them in real-time. As AudioTracks retrieve and play audio in real-time, any changes made to their associated AudioStream objects will also be immediately reflected in the playback. This allows you to adjust the volume, pause, and seek audio position using the relevant AudioStream object properties and methods while the AudioTrack is in operation.
AudioTracks can be stopped by calling their "remove" method. If the Lua Garbage Collector collects an AudioTrack object, it will also be automatically stopped.
Additionally, AudioTracks can be forcibly removed by Firecast. For example, when a user leaves the room, all audio transmission to that room must cease. You can use waitRemoval method, removed attribute, and/or onRemove event to monitor when this occurs.
Propriedade |
Tipo |
Descrição |
audioStream |
(Read-only) The associated AudioStream object providing audio signal to the AudioTrack. Remarks:
|
|
Boolean |
(Read-only) Indicates whether the track has been removed from its AudioPlayer object.
|
Método |
Descrição |
Removes the AudioTrack from its AudioPlayer, halting the playback. Arguments: None Return:
Remarks
|
|
Sets up a wait that monitors the removal state of the AudioTrack. Arguments: None Return:
Remarks:
|
Nome do evento |
Descrição |
|
This event is triggered by Firecast when the AudioTrack is removed from its AudioPlayer. Remarks:
|
Created with the Personal Edition of HelpNDoc: Don't Let Unauthorized Users View Your PDFs: Learn How to Set Passwords