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

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
Roku Guru

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
Streaming Star

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.