audio.createSoundFromURL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
|returnInfo = a sound object | |returnInfo = a sound object | ||
|returnFail1 = void | |returnFail1 = void | ||
|notes = Supported formats include [https://en.wikipedia.org/wiki/MP3 MP3] and [https://en.wikipedia.org/wiki/Ogg OGG] | |notes = Supported formats include [https://en.wikipedia.org/wiki/MP3 MP3] and [https://en.wikipedia.org/wiki/Ogg OGG]<br /> | ||
Due to an inherit bug with MP3's appending a small gap at the end of the file, you may experience a slight delay after each play of the audio file. This is especially noticeable when looping the audio. The only workaround for this is to convert the audio file to Ogg Vorbis (ogg) before using it in GTA Connected. | |||
}} | }} |
Revision as of 21:59, 21 March 2025
Function
Client Only
Online and Offline
Available since Client 1.0.0
Sound audio.createSoundFromURL(string url, bool loop)
The audio.createSoundFromURL function is used to create a sound object from an internet stream URL that optionally loops.
Parameters
1) | string | url | The stream URL. |
2) | bool | loop | Whether to play the sound repeatedly. |
Return
Sound | A sound object. |
Notes
- Supported formats include MP3 and OGG
Due to an inherit bug with MP3's appending a small gap at the end of the file, you may experience a slight delay after each play of the audio file. This is especially noticeable when looping the audio. The only workaround for this is to convert the audio file to Ogg Vorbis (ogg) before using it in GTA Connected.
Examples
There aren't any examples for this function.
Compatibility
There isn't any compatibility information for this function.