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: 
jsleuth
Visitor

BrightScript Injection/Eval?

Hi All,

Wondering if it is possible within a Roku app to retrieve BriteScript from a webservice (probably as a simple string) and then evaluate/interpret that string as Britescript and run it within the app?

Use-case is a basic ad-insertion piece for my own app that can run different business logic depending on the return from the webservice. Hoping to keep my options open rather than fixing them when the app is launched.

Thanks,
J
0 Kudos
1 REPLY 1
EnTerr
Roku Guru

Re: BrightScript Injection/Eval?

Yes, it is possible but i would not encourage that.
The error-handling in B/S is limited and in addition you open yourself to external hacking of your channel (since you trust external code). Also, repeated calls of "eval" will slowly leak memory, as compiler generates new bytecode on every call.
0 Kudos