Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
deepakgpt
Visitor

Audio Play in Simple Way

Hi

I am not able to play simple audio app in roku . Can anybody help me for this issues. And also please attach link for that app
I found a app of audio app online and Url for this app is http://kaz.dl.sourceforge.net/project/rokusdkexamples/simplevideoplayer.zip but I cant understand their code .So plz help me to out this problem

Thanks
0 Kudos
1 REPLY 1
RokuJoel
Binge Watcher

Re: Audio Play in Simple Way

perhaps some code would help:


sub main()
audio={url:"http://archive.org/download/RagRadio2013-07-05--GuySchwartz/RagRadio2013-07-05-GuySchwartz.mp3",streamformat:"mp3"}
port=createobject("roMessagePort")
audioplayer=createobject("roAudioPlayer")
audioplayer.setmessageport(port)
audioplayer.addcontent(audio)
audioplayer.play()
while true
msg=wait(10,port)
if type(msg)="roAudioPlayerEvent" then
if msg.isStatusMessage() then
print "Status:";msg.getmessage();" index:";msg.getindex()
else if msg.isfullresult() then
return
end if
end if
end while
end sub
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.