我已经下载了示例封装,并将其实现到我的封装中,它正在工作,但现在我需要传递几个it并为歌曲生成内容。
所以我对followup的意图是
intent{
goal:PlaySongs
value-set:MultipleArtistId{$expr(singleArtistEvent.artistId)}
}我的PlaySongs操作文件如下所示
action (PlaySongs) {
type (Search)
collect {
computed-input (songToPlay) {
description (Create the playlist to play)
type (audioPlayer.AudioInfo)
min (Required) max (One)
compute {
intent {
goal: GetMeArtistSong
value-set: MultipleArtistId
}
}
hidden
}
computed-input (play) {
description (By passing in the AudioInfo object to the PlayAudio action, we ask the client to play our sound.)
type (audioPlayer.Result)
compute {
intent {
goal: audioPlayer.PlayAudio
value: $expr(songToPlay)
}
}
hidden
}
}
output (Result)
}GetMeArtistSong操作文件如下所示
action (GetMeArtistSong) {
type(Search)
description (Artist Song)
collect {
input (artistId) {
type (MultipleArtistId)
min (Optional) max (One)
}
}
output (audioPlayer.AudioInfo)
}我无法在GetMeArtistSong js文件中获取艺术家id。我做错了什么?隐藏是为了什么呢?请解释一下。
发布于 2019-06-20 02:09:23
hidden意味着链接的JS函数不需要将该输入作为参数列出。如果没有hidden,您的JS函数需要同时使用songsToPlay和play作为参数。artistId的问题。它不应该与音频播放器相关。检查端点并执行console.log(),我的感觉是操作模型和JS函数没有正确链接。此外,您可能希望更改为min(Required)以强制输入。https://stackoverflow.com/questions/56653361
复制相似问题