Pular para o conteúdo

getSoundMetaTags

Cliente Som OOP som:getMetaTags()

Lê as tags de um arquivo ou de um stream.

table getSoundMetaTags ( element oSom )
string getSoundMetaTags ( element oSom, string formato )
NomeTipoPadrãoDescrição
oSomelement—Som a consultar.
formatostring—Um formato de tag específico. Omitir o argumento — ou passar uma string vazia — devolve a tabela completa.

Com formato, o texto da tag pedida, ou false se ela não existir. Sem formato, uma tabela com as chaves abaixo — só entram as que têm conteúdo. Devolve false se o argumento não for um som.

ChaveFormato equivalente
title"%TITL"
artist"%ARTI"
album"%ALBM"
genre"%GNRE"
year"%YEAR"
comment"%CMNT"
track"%TRCK"
composer"%COMP"
copyright"%COPY"
subtitle"%SUBT"
album_artist"%AART"
stream_name"streamName"
stream_title"streamTitle"
local tags = getSoundMetaTags(musica)
if tags and tags.artist then
outputDebugString(tags.artist .. " - " .. (tags.title or "?"))
end
-- o título que a rádio anuncia agora
local agora = getSoundMetaTags(radio, "streamTitle")