Roku Developer Program

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

Define XML component in Brightscript?

I don't think this is possible, but asking just in case:

Is it possible to define an XML component purely from Brightscript?
i.e. a create a new, named, component definition that could be used, for instance, as the itemComponentName, in a RowList.  (https://sdkdocs.roku.com/display/sdkdoc ... LComponent)

We have very dynamic component types that are not known before-hand so packaging XML components with the channel is not possible without using a remote component library or else using component definitions with many extra fields that we then hide.
0 Kudos
2 REPLIES 2
joetesta
Level 11

Re: Define XML component in Brightscript?

I don't think that's possible either, you can create an existing component on the fly (from brs) but afaik you can't define a new one.  But, you can addFields after the fact to dynamically add any fields you need to your component.  so you might be able to create shell components (extend Group) and put any fields on them later.
aspiring
0 Kudos
destruk
Level 10

Re: Define XML component in Brightscript?

I did try doing this with the video component, defining/creating it entirely from brightscript without a single XML reference. Now perhaps I did something wrong, but doing it this way resulted in a video that only played audio, didn't have any trickplay capability/bif files visible, and other issues.  The default video component when created in XML has about 40 separate children and features created with it by default that aren't present when you create it from brightscript only.
0 Kudos