AudioPages
Mostrar obsoleto
*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.
Una versión especial de la clase Pages devuelta por AssetService:SearchAudio() . Ve el siguiente ejemplo de código para referencia sobre el formato de datos devuelto.
Muestras 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
}
}
--]]
Resumen
Métodos
Métodos heredados de PagesDevuelve los elementos en la página actual. Las claves en el elemento se determinan por la fuente de este objeto.
Itera a la siguiente página en el objeto páginas, si es posible.
Propiedades
Propiedades heredado de Pages
Métodos
Propiedades heredado de Pages