Function loadConfig() as Object
channels = []
request = CreateObject("roUrlTransfer")
port = CreateObject("roMessagePort")
request.SetMessagePort(port)
request.SetUrl("http://mytv.com/json.php")
jsonString = request.GetToString()
json = ParseJSON(jsonString)
for each channel in json.channels
arrayElement = {
Title: channel.Title
streamFormat: channel.streamFormat
Logo: channel.Logo
Stream: channel.Stream
}
channels.push(arrayElement)
end for
return channels
End Function
But i am getting Following error in Console
------ Running dev 'MultiLive' main ------
BRIGHTSCRIPT: ERROR: roUrlTransfer: class PLUGIN|MARKUP on thread RENDER: pkg:/components/Config.brs(6)
BRIGHTSCRIPT: ERROR: roMessagePort: Trying to construct a message port on a non-plugin thread: pkg:/components/Config.brs(7)
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
Suspending threads...
Thread selected: 1* pkg:/components/Config.brs(8) request.SetMessagePort(port)
Current Function:
004: Function loadConfig() as Object
005: channels = []
006: request = CreateObject("roUrlTransfer")
007: port = CreateObject("roMessagePort")
008:* request.SetMessagePort(port)
009: request.SetUrl("http://mytv.com/json.php")
010: jsonString = request.GetToString()
011:
Hi,
I have JSON URL with Channels Ex: http://mytv.com/json.php
and i have coded in my config.brs like bellow
But i am getting Following error in Console
Please help me to resolve this. thanks.