Now that I've learned how to retrieve xml and parse it for url's to play, how to enque the urls into an roAudioPlayer, and start it playing, I'm trying to learn how to do button detection so I can pause, skip, exit, etc. I've slightly modified this code snippet from the RokuDVP Component Reference to print out messages, but all it prints are the messages coming from the roAudioPlayer, not button presses on the remote. What am I missing?
while true
msg = wait(0, port)
?type(msg)
?"message is: ";msg.getmessage()
if type(msg) = "roAudioPlayerEvent"
if msg.isStatusMessage() then
print "roAudioPlayerEvent: "; msg.getmessage()
if msg.getmessage() = "end of playlist" return
endif
endif
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!