You just need the ID of the channel to launch. However, the channel must be published (double check though, this may have changed) before you can actually test this, so test with the id of a published channel and then put in the correct id before publishing.
Here is an example:
Function launch(id as string, seconds=5 as Integer) as String
val=""
timeout% = 1000 * seconds
xfer=createobject("roURLTransfer")
str = ""
xfer.seturl("http://"+getip()+":8060/launch/11?contentID="+id)
?xfer.geturl()
port=createobject("romessageport")
xfer.setport(port)
if (xfer.AsyncPostFromString(val))
event = wait(timeout%, port)
if type(event) = "roUrlEvent"
print "1"
str = event.GetString()
elseif event = invalid
print "2"
?"AsyncPostFromString timeout"
xfer.asynccancel()
else
print "3"
?"AsyncPostFromString unknown event"
endif
endif
?
return str
End Function
function getip() as string
di=createobject("rodeviceinfo")
temp=di.getipaddrs()
temp.reset()
while true
aakey=temp.next()
if not temp=invalid then
return temp[aakey]
end if
end while
end function
- Joel