m.readVideoContentTask = createObject("RoSGNode","VideoContentReader")
m.readVideoContentTask.observeField("videocontent","showvideolist")
m.readVideoContentTask.videocontenturi = "pkg:/server/videocontent.xml"
m.readVideoContentTask.control = "RUN"
m.readVideoContentTask.videocontenturi = "pkg:/server/videocontent.xml"
m.readVideoContentTask.videocontenturi = "http://yourserver/yourcontennt.xml"
"keeptalking" wrote:
Hi all,
I am trying to understand and alter the sample code from the "videolist" example. I want to change it so it gets the xml video listing from my own remote server rather than having it hard coded into the app.
"keeptalking" wrote:
I am using this example:
https://sdkdocs.roku.com/download/attac ... 629&api=v2
' uncomment/conditionalize for development package XML transfers (pkg:/server/foo.xml)'
xmlstring = ReadAsciiFile(m.top.videocontenturi)
videocontentxml.parse(xmlstring)
' uncomment/conditionalize for published channel Internet XML transfers (http://serverdomain/foo.xml)'
' readInternet = createObject("roUrlTransfer")'
' readInternet.setUrl(m.top.foocontentxmluri)'
' foocontentxml.parse(readInternet.GetToString())'
readInternet.setUrl(m.top.videocontenturi)
videocontentxml.parse(readInternet.GetToString())
m.readVideoContentTask.observeField("videocontent","showvideolist")
m.readVideoContentTask.videocontenturi = "http://your-domain/videocontent.xml"
m.readVideoContentTask.control = "RUN"
Hi, I am using the VideoListExample as well and I need to add a Http Header when I call the URLs of the streams stored in the XML.
The Http Header is the user agent and will be the same for each stream.
Can someone help me with the right piece of code to add?
Thanks