AudioPages
Mostrar obsoleto
*Este conteúdo é traduzido por IA (Beta) e pode conter erros. Para ver a página em inglês, clique aqui.
Uma versão especial da classe Pages retornada por AssetService:SearchAudio() . Veja o seguinte exemplo de código para referência sobre o formato de dados retornado.
Amostras de código
This code gets the music assets returned by the keyword "happy" and prints out their titles.
Getting Music Search Titles
local AssetService = game:GetService("AssetService")
local audioSearchParams = Instance.new("AudioSearchParams")
audioSearchParams.SearchKeyword = "happy"
local success, result = pcall(function()
return AssetService:SearchAudio(audioSearchParams)
end)
if success then
local currentPage = result:GetCurrentPage()
for _, audio in currentPage do
print(audio.Title)
end
else
warn("AssetService error: " .. result)
end
--[[ Returned data format
{
"AudioType": string,
"Artist": string,
"Title": string,
"Tags": {
"string"
},
"Id": number,
"IsEndorsed": boolean,
"Description": string,
"Duration": number,
"CreateTime": string,
"UpdateTime": string,
"Creator": {
"Id": number,
"Name": string,
"Type": number,
"IsVerifiedCreator": boolean
}
}
--]]
Resumo
Métodos
Métodos herdados de PagesRetorna os itens na página atual. As chaves no item são determinadas pela fonte deste Objeto.
Itera para a próxima página no objeto Páginas, se possível.
Propriedades
Propriedades herdado de Pages
Métodos
Propriedades herdado de Pages