
Oak-Beard
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
11:49 AM
is dynamic loading of brs modules possible?
I'm pretty sure the answer to this question is going to be "No" but I'll cross my fingers and ask it anyway....
Is it possible for a channel's package to use a URL to download and access additional brightscript code modules? As an example use-case, think of Vudu, Amazon, or Netflix as the channel package and when the user selects a specific title (e.g., Big Buck Bunny) some brs code specific to that title gets downloaded and invoked.
Thanks.
Is it possible for a channel's package to use a URL to download and access additional brightscript code modules? As an example use-case, think of Vudu, Amazon, or Netflix as the channel package and when the user selects a specific title (e.g., Big Buck Bunny) some brs code specific to that title gets downloaded and invoked.
Thanks.
8 REPLIES 8

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
12:05 PM
Re: is dynamic loading of brs modules possible?
The actual functions for the program have to compile and be part of the channel code, but you can download tons of data to be used by the program in interesting and creative ways.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
12:27 PM
Re: is dynamic loading of brs modules possible?
You can use Run or Eval to execute downloaded Brightscript code. Writing custom code for each piece of content doesn't seem like a great idea to me, but you can do it if you want to.
--Mark
--Mark

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
12:30 PM
Re: is dynamic loading of brs modules possible?
You can, but I don't know if it would pass for public publishing, as that would introduce the possibility of updating the channel without Roku's approval.
Take a look at the Eval and Run functions in the BrightScript Language Reference.
Take a look at the Eval and Run functions in the BrightScript Language Reference.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
12:32 PM
Re: is dynamic loading of brs modules possible?
I believe there's at least one channel in the Channel Store that uses this approach, but it was added quite a long time ago and I'm not sure it still functions.
-JT
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
01:02 PM
Re: is dynamic loading of brs modules possible?
What would be a typical use for this? I'm clueless to be sure but the only thing I could come up with was some sort of emergency remote self-destruct mechanism, which doesn't have a lot of use in a DVP, not carrying a lot of toxic rocket-fuel on board.
Kinetics Screensavers

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
02:47 PM
Re: is dynamic loading of brs modules possible?
"TheEndless" wrote:
You can, but I don't know if it would pass for public publishing, as that would introduce the possibility of updating the channel without Roku's approval.
This is important to know!
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015
05:48 PM
Re: is dynamic loading of brs modules possible?
"squirreltown" wrote:
What would be a typical use for this? I'm clueless to be sure but the only thing I could come up with was some sort of emergency remote self-destruct mechanism, which doesn't have a lot of use in a DVP, not carrying a lot of toxic rocket-fuel on board.
Before Roku kills off support for the 1st gen boxes, I plan on creating my own channel of channels that I can update at will.
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

Oak-Beard
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2015
11:49 AM
Re: is dynamic loading of brs modules possible?
First off, thanks to all who replied. I will definitely take a look at the Eval() and Run() functions.
In response to those who asked what would be a use-case for this type of approach, one that comes to mind would be a games channel. Each game would require its own custom code to handle animation, event responses, etc. It doesn't seem practical to have every game include in the channel package. Rather you would want to handle game selection in a manner similar to the way a selected movie gets accessed and downloaded from a server only when selected by the user.
In response to those who asked what would be a use-case for this type of approach, one that comes to mind would be a games channel. Each game would require its own custom code to handle animation, event responses, etc. It doesn't seem practical to have every game include in the channel package. Rather you would want to handle game selection in a manner similar to the way a selected movie gets accessed and downloaded from a server only when selected by the user.