Roku Developer Program

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

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.

0 Kudos
1 Reply
Level 10

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