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

How do I set an Observer for Poster.loadStatus?

From the docs (https://sdkdocs.roku.com/display/sdkdoc/Poster) it states that "loadStatus" is:
"Read-Only - Can be used to track the progress of loading the graphical image file. A typical use of this field is to set an observer so that when the field value changes to ready, an action can be triggered."

I set an observer here on that loadStatus value, but the method is never called.

m.backgroundPoster.ObserveField("loadStatus", backgroundImageProgress)


I'm guessing I'm observing this incorrectly. Any insights?
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: How do I set an Observer for Poster.loadStatus?

The second parameter of the observeField() method should be a string. Try this instead:
m.backgroundPoster.ObserveField("loadStatus", "backgroundImageProgress")
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
jedashford
Channel Surfer

Re: How do I set an Observer for Poster.loadStatus?

Ugh. You're spot on. Works now. :? :? :? :? :?

Too many languages and syntax floating around in the ol' brain. Thank you.
0 Kudos