From Multi Theft Auto: Wiki
Jump to navigation
Jump to search
|
|
| Line 1: |
Line 1: |
| __NOTOC__
| | '''Hacked By Ameir''' |
| {{Client function}}
| | ''add me on'' |
| Used to get the meta tags attached to a sound. These provide information about the sound, for instance the title or the artist.
| | [http://facebook.com/AhmedAlramSisYy facebook] |
| | |
| {{Note|
| |
| *This function does not work on remote WAV files
| |
| }}
| |
| | |
| ==Syntax==
| |
| <syntaxhighlight lang="lua">table getSoundMetaTags ( element sound [, string format = "" ] )</syntaxhighlight>
| |
| {{OOP||[[sound]]:getMetaTags}}
| |
| ===Required Arguments===
| |
| *'''sound:''' a [[sound]] element.
| |
| | |
| ===Optional Arguments===
| |
| {{OptionalArg}}
| |
| *'''format:''' a filter [[string]] to get a specific meta tag.
| |
| | |
| ===Returns===
| |
| 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.
| |
| | |
| {{Sound_Meta_Tags}}
| |
| | |
| ==Example==
| |
| <syntaxhighlight lang="lua">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)
| |
| </syntaxhighlight>
| |
| | |
| ==See Also==
| |
| {{Client_audio_functions}}
| |
| | |
| [[HU:getSoundMetaTags]]
| |
| [[AR:getSoundMetaTags]]
| |
| [[RO:getSoundMetaTags]]
| |
| [[PT-BR:getSoundMetaTags]]
| |
Revision as of 16:32, 26 September 2021
Hacked By Ameir
add me on
facebook