RO/getSoundMetaTags

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Această funcție este folosită pentru obținerea informațiilor (meta tags) atașate unui sunet. De exemplu, titlul sau numele artistului.

Sintaxă

table getSoundMetaTags(element sound [, string format = "" ])

OOP Syntax Help! I don't understand this!

Method: sound:getMetaTags(...)


Argumente Necesare

  • sound: un element de tip sound.

Argumente Opționale

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • format: un string filtru folosit pentru a obține o anume informație.

Redare

Redă un table, însă doar un string dacă există argumentul format, cu toate informațiile disponibile (cheile sunt descrise mai jos). În caz contrar false.

  • title
  • artist
  • album
  • genre
  • year
  • comment
  • track
  • composer
  • copyright
  • subtitle
  • album_artist
  • stream_name
  • stream_title

Exemplu

addEventHandler("onClientSoundFinishedDownload", root, function(length)
	local meta = getSoundMetaTags(source)
	outputChatBox("Sunetul " .. (meta.title) .. " s-a încheiat în: " .. length .. "ms.")
        outputChatBox("Informații atașate sunetului: Artist: " .. (meta.artist) .. " Album: " .. (meta.album) .. " Gen: " .. (meta.genre) .. " An: " .. (meta.year) .. " Comentariu: " .. (meta.comment) .. " Denumire: " .. (meta.track) .. " Compozitor: " .. (meta.composer) .. " Drepturi de autor: " .. (meta.copyright) .. " Sub-titlu: " .. (meta.subtitle) .. " Artist album: " .. (meta.album_artist) .. ".")
end)

Vizualizați de asemenea