简体   繁体   中英

roUrlTransfer function not working in BrightScript

I am creating my own channel for Roku. I need to get the streams of my videos and images from a JSON file on a server.

Code in my SceneGraph .xml file:

<![CDATA[sub init()
 data = CreateObject("roUrlTransfer")
 data.SetUrl(url)
 data.AsyncGetToString()
end sub]]>

This code is working fine in a Task node and the main.brs file, but in my .xml file it generates this error: "invalid BrightScript Component or interface reference" .

Please help me with a solution.

Within SceneGraph applications, you are only allowed to use roUrlTransfer in Task nodes, to ensure all network traffic is handled asynchronously. Could that be the source of the problem? Or are you referring to the XML of your Task node?

The full list of limitations on how you can use BrightScript in SceneGraph can be found in the Roku SDK documentation, specifically the section BrightScript Support .

This function only uses in Task nodes within Scene Graph Applications. BrightScript Support

Task Node

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM