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: 
newchannel
Roku Guru

Re: simplevideoplayer to play mp3 question

belltown,

Thank you. I learned something new.

I appreciate it so much. It's working. It opens and starts playing the stream automatically.
http://www.victoryNOWfilmsandtv.com
0 Kudos
newchannel
Roku Guru

Re: simplevideoplayer to play mp3 question

one other question...

working on changing the artwork from the npr logo to another. I tested by taking

mm_icon_side_sd=pkg:/images/music-notes1.png


and placing it into the npr.brs file in place of the http link that is in the original example

it got rid of the npr logo but I only got a white space.

what is the correct way to add HD and SD images to change out that npr logo when images are included in the "package"?

I know the images go in the images folder. Not sure the correct way to add both an HD and an SD to the npr.brs file

Thanks much again.
http://www.victoryNOWfilmsandtv.com
0 Kudos
belltown
Roku Guru

Re: simplevideoplayer to play mp3 question

If you did as you said, it should work. You probably didn't copy the image url correctly. It's hard to say without actually seeing the code you're using in Npr.brs.
0 Kudos
newchannel
Roku Guru

Re: simplevideoplayer to play mp3 question

Sorry I should have posted it before:

trying to add HD and SD image from package. I only have the sd listed in code. Not sure how to properly add both when images are in a package. I'm used to adding from my server.

Thank you.


'**********************************************************
'** Audio Player Example Application - Audio Playback
'** November 2009
'** Copyright (c) 2009 Roku Inc. All Rights Reserved.
'**********************************************************

' NPR support routines

Function CreateNPRSongList() as Object
aa = CreateObject("roAssociativeArray")
aa.posteritems = CreateObject("roArray", 10, true)
song = CreateSong("NPR","Live MP3 Internet Radio Stream","Many", "mp3", "http://xxxxxxxxxxxxxxx.net/xxxxxMP3","mm_icon_side_sd=pkg:/images/music-notes1.png")
aa.posteritems.push(song)
return aa
End Function

Sub DoNPR(from as string)
'Since there is only one item, go right into playing the NPR stream
SongList = CreateNprSongList()
Show_Audio_Screen(songlist.posteritems[0], from)
End Sub
http://www.victoryNOWfilmsandtv.com
0 Kudos
belltown
Roku Guru

Re: simplevideoplayer to play mp3 question

You didn't copy the image url correctly. Your code should be:

song = CreateSong("NPR","Live MP3 Internet Radio Stream","Many", "mp3", "http://xxxxxxxxxxxxxxx.net/xxxxxMP3","pkg:/images/music-notes1.png")


That will use the same image for both SD and HD. If you want separate images, you'll have to add an extra parameter to CreateSong for the other image. I'll leave that part as an exercise for you to figure out.
0 Kudos
newchannel
Roku Guru

Re: simplevideoplayer to play mp3 question

I see what I did wrong.

Thank you much.
http://www.victoryNOWfilmsandtv.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.