OpenRTMFP/Cumulus — Issue #57: Cirrus example doesn't work :)
Author: dimon777
Created: 2012-02-13 23:13:46+00:00
State: open

I've added into www/main.lua as prescribed in the https://github.com/OpenRTMFP/Cumulus/wiki/FAQ
And getting these errors in the console:

ERROR www/main[14] LUAScript (field 'writeAMFMessage'): bad cast of 'this' argument, call method with ':' colon operator
ERROR www/main[15] LUAScript (field 'flush'): 'this' argument has no metatable, call method with ':' colon operator

Just for the reference, here is my www/main.lua:

function onStart(path)
print("Server application "..path.." started")
end
function onStop(path)
print("Server application "..path.." stopped")
end

function relay(client,targetId,...)
target = cumulus.clients(targetId)
if not target then
error("client "..targetId.." not found")
return
end
target.writer.writeAMFMessage("onRelay",client.id,unpack(arg))
target.writer.flush(true)
end