Currently have a result view that displaying a list of audio title while playing audios, would like to change to another playlist by on-click on the list. So in my mind, i would pass the audioInfo to the action that play audio, relaunch a new playlist.
on-click{
intent{
goal: playNews
value: audio.AudioInfo(this)
}
}
But audio.AudioInfo is not a primitive type. Would love to ask is there a primitive type for audioInfo?
As stated in our online DOC, the audio.AudioInfo is a structure.
It is just matter of syntax when doing intent
. The way you are using is usually giving a predefine primitive value at compile time, like the following.
intent {
goal: FindAge
value: IntAge(18)
}
To fix your code, do the following, and you can read more about the syntax here in our online DOC.
on-click{
intent{
goal: playNews
value: $expr(this)
}
}
In fact, I would recommend the later syntax even for primitive types as long as the value pass in is not a constant defined at compile time.