getSoundMetaTags
Client-side
Server-side
Shared
Used to get the meta tags attached to a sound. These provide information about the sound, for instance the title or the artist.
Note
This function does not work on remote WAV files.
OOP Syntax Help! I don't understand this!
- Method: sound:getMetaTags(...)
Syntax
table|string|false getSoundMetaTags ( sound theSound, [ string format = "" ] )
Required Arguments
- theSound: A sound element.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- format (default: ""): A filter string to get a specific meta tag.
Returns
- table|string|false: meta-tags
- title
- artist
- album
- genre
- year
- comment
- track
- composer
- copyright
- subtitle
- album_artist
- stream_name
- stream_title
Returns a table, but only a string if format is given, with all data available (keys are listed below) for the sound if successful, false otherwise. If any data is unavailable then the associated key is not written to the table.
Code Examples
client
addEventHandler("onClientSoundFinishedDownload",root,function(length) local meta = getSoundMetaTags(source) outputChatBox("The sound: "..(meta.title).." has finished in :"..length.."ms.") outputChatBox("The sound meta tags: Artist:"..(meta.artist).." Album:"..(meta.album).." Genre:"..(meta.genre).." Year:"..(meta.year).." Comment:"..(meta.comment).." Track:"..(meta.track).." Composer:"..(meta.composer).." Copyright:"..(meta.copyright).." SubTitle:"..(meta.subtitle).." Album Artist:"..(meta.album_artist)..".")end)
See Also
Audio Functions
- getRadioChannelName
- getRadioChannel
- getSoundBPM
- getSFXStatus
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLevelData
- getSoundLength
- getSoundMetaTags
- getSoundMaxDistance
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundMaxDistance
- setSoundLooped
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound