Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
jedashford
Level 7

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
TheEndless
Level 7

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
Level 7

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