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: 
TheEndless
Channel Surfer

Re: URIs for overhang artwork

I think the thread went slightly off topic. In my testing, no, you can't use an http URL with the theme attributes, but you can use the roUrlTransfer component to grab them to a tmp:/ location and use that instead.
You can also use the roAppManager's SetThemeAttribute() method to change them at runtime, but it will require that you redraw the current screen in order to update it.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: URIs for overhang artwork

No, I've got it working, it's pretty badass, you can change for certain the primary and secondary logo image using a URL in near real time. I can't confirm the slice URL yet though.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
TheEndless
Channel Surfer

Re: URIs for overhang artwork

"jbrave" wrote:
No, I've got it working, it's pretty badass, you can change for certain the primary and secondary logo image using a URL in near real time. I can't confirm the slice URL yet though.

With an HTTP url, which is what the OPs question was about?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: URIs for overhang artwork

Yeah dude, http URL. Each poster item has an image URL associated with it, I send it to the app manager and refresh using pretty much the code I posted. Just take the code you use to set up the app manager, stick it in a function with a parameter for URL(s) replace the text that says overhanglogohd="pkg:/..." with your parameter variable and save your new function. Call the function then do something to refresh the screen. Screen.show() doesn't work. I used a pop up one line as shown and blammo! It works.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
TheEndless
Channel Surfer

Re: URIs for overhang artwork

"jbrave" wrote:
Each poster item has an image URL associated with it, I send it to the app manager and refresh using pretty much the code I posted.

Ok, so you're loading them from a poster item. I was trying to load them directly. It appears to work if the image has already been cached (via the poster item in your case), but it does not if you just set the attribute directly to an HTTP url that hasn't been loaded elsewhere.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: URIs for overhang artwork

I don't think the image is cached - the URL of the image is not stored in the poster item, it is in an indexed array. When a user clicks on the poster item, I check that the poster item has "action=play" and if so I start the song and load the url from the array .info (which actually has less items in it than the posterscreen, so I have to calculate the offset):



newTheme(mainposter[m.li].info[itemindex+checkindex(m.co[m.li])].imageURL)
m.audioplayer.SetNext(ItemIndex+checkindex(m.co[m.li]))
m.audioplayer.play()

displaybox()

function NewTheme(url as string)
app = CreateObject("roAppManager")
theme = CreateObject("roAssociativeArray")
theme.OverhangOffsetSD_X = "72"
theme.OverhangOffsetSD_Y = "31"
theme.OverhangSliceSD = "pkg:/images/Overhang_Background_SD.png"
theme.OverhangLogoSD = "pkg:/images/Overhang_Logo_SD.png"
theme.OverhangSecondaryLogoOffsetHD_Y="0"
theme.OverhangSecondaryLogoOffsetHD_y="0"
theme.OverhangSecondaryLogoOffsetSD_x="0"
theme.OverhandSecondaryLogoOffsetSD_y="0"
theme.OverhangOffsetHD_X = "75"
theme.OverhangOffsetHD_Y = "31"
theme.OverhangSliceHD = "pkg:/images/Overhang_Background_HD.png"
theme.OverhangLogoHD = "pkg:/images/Overhang_Logo_HD.png"
theme.OverhangSecondaryLogoHD=url
theme.OverhangSecondaryLogoSD=url
app.SetTheme(theme)
end function


sub displaybox()
lp=createobject("romessageport")
dialog=CreateObject("roOneLineDialog")
dialog.SetTitle("busy")
dialog.setmessageport(lp)
dialog.show()
dialog.close()
end sub

Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
TheEndless
Channel Surfer

Re: URIs for overhang artwork

No, that doesn't sound like caching, but it is odd that that works, but setting the URL directly doesn't. What happens if you call your NewTheme function with an arbitrary HTTP URL (not one in your array) before displaying the first poster screen? That's how I was testing and it wouldn't work.

And on a side note, your displaybox function doesn't need a MessagePort, since you're not actually monitoring it for any messages.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: URIs for overhang artwork

Ok, just tried it, it works. Here is one of the only two ideal images on the net, good for testing:

(exact size and shape of the HD overhang):

http://kb.worldsecuresystems.com/844/cp ... mage8a.png


Here is a link to a video demo I just posted of my Soundcloud app running, using this feature:

http://www.youtube.com/watch?v=gx2mUvruOKo

When I read this thread last night it occured to me that it might be possible to do this, I stayed up till 7:am working on it.

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
TheEndless
Channel Surfer

Re: URIs for overhang artwork

Ok.. so you're clearly doing something completely different than me, because this doesn't work for me. I just get a gray screen...


Sub RunUserInterface()
NewTheme( "http://kb.worldsecuresystems.com/844/cpsid_84445/images/Image8a.png" )
screenFacade = CreateObject( "roPosterScreen" )
screenFacade.SetMessagePort( CreateObject( "roMessagePort" ) )
screenFacade.Show()
wait( 0, screenFacade.GetMessagePort() )
End Sub

function NewTheme(url as string)
app = CreateObject("roAppManager")
theme = CreateObject("roAssociativeArray")
theme.OverhangOffsetSD_X = "72"
theme.OverhangOffsetSD_Y = "31"
theme.OverhangSliceSD = "pkg:/images/Overhang_Background_SD.png"
theme.OverhangLogoSD = "pkg:/images/Overhang_Logo_SD.png"
theme.OverhangSecondaryLogoOffsetHD_Y="0"
theme.OverhangSecondaryLogoOffsetHD_y="0"
theme.OverhangSecondaryLogoOffsetSD_x="0"
theme.OverhandSecondaryLogoOffsetSD_y="0"
theme.OverhangOffsetHD_X = "75"
theme.OverhangOffsetHD_Y = "31"
theme.OverhangSliceHD = "pkg:/images/Overhang_Background_HD.png"
theme.OverhangLogoHD = "pkg:/images/Overhang_Logo_HD.png"
theme.OverhangSecondaryLogoHD=url
theme.OverhangSecondaryLogoSD=url
app.SetTheme(theme)
end function


EDIT: Your channel's shaping up pretty nicely!
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: URIs for overhang artwork

Try it like this maybe, this is sort of how my app works:

Sub main()
inittheme() 'set up your default app manager settings
port=createobject("romessageport")
screenFacade = CreateObject( "roPosterScreen" )
screenFacade.SetMessagePort( port )
screenFacade.Show()
msg=wait( 0, port)
if msg.is (whatever message)
NewTheme( "http://kb.worldsecuresystems.com/844/cpsid_84445/images/Image8a.png" )
displaybox()
End Sub

sub displaybox()
lp=createobject("romessageport")
dialog=CreateObject("roOneLineDialog")
dialog.SetTitle("busy")
dialog.setmessageport(lp)
dialog.show()
dialog.close()
end sub
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos