URIs for overhang artwork

Does the overhang artwork (logos, slices, etc) have to live on pkg:?
I was hoping to pull it from my HTTP server during development to simplify updating and testing of new artwork.

Thanks.

Bump.
Maybe someone at Roku will answer this one.
It should be a definitive answer.

I am almost 99.9% sure you can

why not just give it a try, keep in mind it will use a lot of bandwidth each time someone views it.

I noticed a huge spike in my traffic for just xml requests

“vaxace” wrote:

It should be a definitive answer.

I don’t have a definitive answer, but I highly doubt it has to be in pkg. I haven’t run into a single instance where you have to specify the location of a file and it had to be in pkg:. It may not work with a URL, but I would be very surprised if you couldn’t download into tmp: and use from there. it should be trivial to test in a test channel.

One would expect this to work, but I just tried it, two different ways: 1 setting OverhangSliceHD with an http url when the app loads - no go, just a grey background, 2 setting the theme dynamically while the app is running to an http url. Nope. Doesn’t seem to work.

Next I’ll try forcing download of the object in question to the file system and then setting it, see if that works…

Ok, what Does work so far: setting the Overhang Logo to a url. Next, can it be dynamically changed from moment to moment? Will see in a few minutes.

Ok, so far nothing seems to work past the initial configuration setting for the app theme. Can someone else try experimenting with this? According to the manual, you can change and alter the theme using

SetThemeAttribute(String attributeName, String attributeValue)

and

ClearThemeAttribute(String attributeName)

but so far, no go…

Ok, I’ve had very limited success with this now. First I loaded a image canvas before I load anything else in my app, then my posterscreen. I set the app manager to replace the OverhangLogoHD with a url. Then I close the poster and reload it. Well it worked once and I’m not sure why, but now the poster just loses focus or something - still displays but I’m getting image canvas events and not posterscreen events and I can’t get back to it.

Anyway, I’m going to sleep…hope some intelligent person will figure out how to do dynamic changes to the theme elements and post here…

  • Joel

Ok, I didn’t go to sleep. Here’s what I figured out:

You can for certain load and change the overhang logo from an internet URL. So far, it does not update until you move the focus from the current poster item to a category, or if you load another screen on top and then close the screen. You may need to call screen.show() to get the change to happen at all.

update:

Here’s what is working for me now:

I have a function that assigns the updated url to the secondary poster art:


function Newtheme(url as string)
...
theme.OverhangSecondaryLogoHD=url
theme.OverhangSecondaryLogoSD=url
app.SetTheme(theme)
...
end function

then I have a dialog box function I call and return from:


sub displaybox()
m.history = CreateObject("roArray", 1, true)
lp=createobject("romessageport")
dialog=CreateObject("roOneLineDialog")
'dialog.ShowBusyAnimation()
dialog.SetTitle("busy")
dialog.setmessageport(lp)
dialog.show()
dialog.close()
end sub

The dialog goes so fast, it doesn’t even appear on the screen. The graphics on the main poster screen update almost immediately.

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.

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.

“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?

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.

“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.

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

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.

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

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!

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