getSoundMetaTags
Client
Reads the audio file's tags (MP3's ID3, OGG's and FLAC's comments, WAV's INFO).
table|string|false getSoundMetaTags(sound sound [, string format = ""])
Parameters
| Name | Type | Description |
|---|---|---|
| sound | sound | The sound element, or a dui element for the browser's sound. |
| format | string | A tag format such as %ARTI - %TITL. Empty returns the table of all tags.default "" |
Returns
Without format, a table of the fields the file has: title, artist, album, genre, year, comment, track, composer, copyright, subtitle, album_artist. With format, the text it builds. false if that text is empty or the sound was not found.
Example
local music = playSound("sounds/track.mp3")
local tags = getSoundMetaTags(music)
outputDebugString(("Now playing: %s - %s"):format(tags.artist or "?", tags.title or "?"))