bixby - bixby:音频播放器,如何给音频播放器输入
问题描述
我已经下载了示例胶囊并实现到我的胶囊中并且它正在工作,但现在我需要传递一些 id 并生成歌曲的内容。
所以我的意图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。我做错了什么?隐藏是为了什么?请解释。
解决方案
hidden
表示链接的 JS 函数不需要将该输入作为参数列出。如果没有hidden
,您的 JS 函数需要同时具有songsToPlay
和play
作为参数。- 如果没有实际的 JS 文件和端点文件,我只能推测您关于
artistId
. 它不应该与音频播放器有关。检查端点并做console.log(),我的感觉是动作模型和JS函数没有正确链接。此外,您可能希望更改min(Required)
为强制输入。
推荐阅读
- matlab - 如何使用给定 k 范围(降低频率)的 besselh 函数在 matlab 中绘图?
- windows - statsmodel 在 Windows 上保存泡菜文件时出错
- docker - perf 监控未统计的 docker 容器
- php - 带有大小和不带大小的正则表达式 img 标签
- c# - 当页面重新成为焦点时重新加载数据
- javascript - 从网页检查谷歌电子表格
- java - 不明确的表名异常,即使有模式集
- bash - Windows 10 Ubuntu bash下编译使用System C
- sql-server - SQL Server 与 GROUP BY 的连接
- vba - VBA - 如果单元格有文本,如何抓取下面的单元格?