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

Make hard coded content an external link to it... HELP!!

I currently have a hard code in the channel that goes like the one below... However, how can I place this into an external website and then input a code that replaces all of this so it can load it from the website. Therefore, if I add new content I can simply update the external website.


Function loadConfig() as Object
   arr = [
'##### Format for inputting stream info #####
'## For each channel, enclose in brackets ##
'{
'   Title: Channel Title
'   streamFormat: Channel stream type (ex. "hls", "ism", "mp4", etc..)
'   Logo: Channel Logo (ex. "http://Roku.com/Roku.jpg)
'   Stream: URL to stream (ex. http://hls.Roku.com/talks/xxx.m3u8)
'}
   
{
   Title: "Roku Example One"
   streamFormat: "HLS"
   Logo: "https://placeholdit.imgix.net/~text?txtsize=33&txt=channel+logo&w=267&h=150"
   Stream: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
}
{
   Title: "Roku Example Two"
   streamFormat: "HLS"
   Logo: "https://placeholdit.imgix.net/~text?txtsize=33&txt=channel+logo&w=267&h=150"
   Stream: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
}
{
   Title: "Roku Example Three"
   streamFormat: "mp4"
   Logo: "https://placeholdit.imgix.net/~text?txtsize=33&txt=channel+logo&w=267&h=150"
   Stream: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
}
{
   Title: "Roku Example Four"
   streamFormat: "mp4"
   Logo: "https://placeholdit.imgix.net/~text?txtsize=33&txt=channel+logo&w=267&h=150"
   Stream: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
}
{
   Title: "Roku Example Five"
   streamFormat: "mp4"
   Logo: "https://placeholdit.imgix.net/~text?txtsize=33&txt=channel+logo&w=267&h=150"
   Stream: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
}
{
   Title: "Roku Example Six"
   streamFormat: "mp4"
   Logo: "https://placeholdit.imgix.net/~text?txtsize=33&txt=channel+logo&w=267&h=150"
   Stream: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4"
}
   
   
   
'##### Make sure all Channel content is above this line #####    
   ]
   return arr
End Function
0 Kudos
3 REPLIES 3
belltown
Roku Guru

Re: Make hard coded content an external link to it... HELP!!

Are you doing this in a Scene Graph channel or using standard components?
0 Kudos
calengineer
Visitor

Re: Make hard coded content an external link to it... HELP!!

"belltown" wrote:
Are you doing this in a Scene Graph channel or using standard components?

scenegraph
0 Kudos
belltown
Roku Guru

Re: Make hard coded content an external link to it... HELP!!

Take a look at the Task Markup example in the Control Nodes Markup Scene Graph tutorial (https://sdkdocs.roku.com/display/sdkdoc/Control+Nodes+Markup), particularly the contentreader.xml file.
0 Kudos