while true 'loop forever for this example, in the real world you would be checking the message port and tracking current song etc. end while end sub
To implement a next button, I'm assuming you are using an roSpringboardScreen, and you would add a button with the addbutton method, and implement an if-then to handle when that button is pressed, in which case you would use the setnext() property, and call play()
Hey Joel - thanks for the help there. I'm trying to just have a function that goes to the next content item - doesn't the app already know what content item I'm currently on? How do I retrieve this information and use it in setNext? When I use Play() does it play the current item or always play the item that is "set Next"?
You need to keep track of this in a separate variable, so when you create a playlist and initiate playback, lets say you start from the second item in the playlist because you don't like the first two songs, you would set your index variable to 1 since lists are arrays which are zero indexed where the first item in the list is list. When you get an roAudioPlayerEvent that indicates the end of playback isrequestsucceeded() I think is the event, then you would increment your index, so you would know which song you are on.