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: 
5ytech
Visitor

How to play Live Audio

I am struck in playing this live audio:
http://183.82.0.45:8000/c645ed8b-512a-4 ... f84a1a39b9
this is in "WMA" format. i am not sure how to play this.

i am get error as "cannot seek to 0/1000: error -33"

my code is:

Sub Main()
audioPlayer = CreateObject("roAudioPlayer")
port = CreateObject("roMessagePort")
audioPlayer.SetMessagePort(port)
song = CreateObject("roAssociativeArray")
song.url = "http://183.82.0.45:8000/c645ed8b-512a-48a6-95c9-bcf84a1a39b9"
song.StreamFormat = "WMA"
audioplayer.addcontent(song)
print song
audioplayer.setloop(true)
audioPlayer.play()

while true
msg = wait(0, port)
if type(msg) = "roAudioPlayerEvent"
if msg.isStatusMessage() then
print "roAudioPlayerEvent: "; msg.getmessage()
if msg.getmessage() = "end of playlist" return
endif
endif
end while
End Sub

and also i want to know what is the text format roku use
0 Kudos
1 REPLY 1
gonzotek
Visitor

Re: How to play Live Audio

"5ytech" wrote:
I am struck in playing this live audio:
http://183.82.0.45:8000/c645ed8b-512a-4 ... f84a1a39b9
this is in "WMA" format. i am not sure how to play this.

i am get error as "cannot seek to 0/1000: error -33"

my code is:

Sub Main()
audioPlayer = CreateObject("roAudioPlayer")
port = CreateObject("roMessagePort")
audioPlayer.SetMessagePort(port)
song = CreateObject("roAssociativeArray")
song.url = "http://183.82.0.45:8000/c645ed8b-512a-48a6-95c9-bcf84a1a39b9"
song.StreamFormat = "WMA"
audioplayer.addcontent(song)
print song
audioplayer.setloop(true)
audioPlayer.play()

while true
msg = wait(0, port)
if type(msg) = "roAudioPlayerEvent"
if msg.isStatusMessage() then
print "roAudioPlayerEvent: "; msg.getmessage()
if msg.getmessage() = "end of playlist" return
endif
endif
end while
End Sub

and also i want to know what is the text format roku use
The only live-stream options for audio on Roku are mp3 via the shoutcast protocol, or mp3/mp4 audio-only streams via the HLS protocol. WMA is not supported for live streaming.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
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.