Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
neowinston
Visitor

Audio player using roAudioPlayer not working

I'm using the following code to play audio, but it's not working. I've even put the code on Task, but no sound either. Wha am I doing wrong? Thanks for your help!


    audioPlayer = CreateObject("roAudioPlayer")
    port = CreateObject("roMessagePort")
    audioPlayer.SetMessagePort(port)
    song = CreateObject("roAssociativeArray")
    song.url = m.top.programURL
    audioplayer.addcontent(song)
    audioplayer.setloop(false)
    audioPlayer.play()
Tags (1)
0 Kudos
4 REPLIES 4
renojim
Community Streaming Expert

Re: Audio player using roAudioPlayer not working

roAudioPlayer cannot be used in roSG:
https://sdkdocs.roku.com/display/sdkdoc ... pt+Support
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
Tags (1)
0 Kudos
neowinston
Visitor

Re: Audio player using roAudioPlayer not working

Thanks for the reply! What should I use? I appreciate your help. 
Tags (1)
0 Kudos
renojim
Community Streaming Expert

Re: Audio player using roAudioPlayer not working

I haven't used any of them, but here ya go:
https://sdkdocs.roku.com/display/sdkdoc ... back+Nodes
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
Tags (1)
0 Kudos
neowinston
Visitor

Re: Audio player using roAudioPlayer not working

Thank you, it helped me a lot!
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!