Forum Discussion

5ytech's avatar
5ytech
Visitor
13 years ago

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

1 Reply

  • "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.