go back to the videoplayer example. Modify your XML to include a field that says audio or video, like:
<contentformat>audio</contentformat>
and also, if it is audio, then add something like
<audiostreamurl>http://myserver.com/myfile.mp3</audiostreamurl>
and of course set the streamformat to mp3 or mp4 depending on the content type.
add a parser for that field to the parse_show_feed function.
item.contentformat = validstr(curShow.contentformat.GetText())
item.audiostreamurl = validstr(curShow.audiostreamurl.GetText())
In your Springboard screen code, check if the contentformat=audio or video, if not video, call your audioplayer function:
if msg.GetIndex() = 2
if showlist[showindex].contentformat <> "audio" then
showList[showIndex].PlayStart = 0
showVideoScreen(showList[showIndex])
refreshShowDetail(screen,showList,showIndex)
else
playaudio(showlist[showindex))
refreshShowDetail(screen,showList,showIndex)
end if
endif
That should provide you with a rough outline of how to do it.
- Joel