OpenRTMFP / Cumulus

CumulusServer is a complete open source and cross-platform RTMFP server extensible by way of scripting
http://groups.google.com/group/openrtmfp-cumulus
GNU General Public License v3.0
593 stars 222 forks source link

Cirrus example doesn't work :) #57

Closed dimon777 closed 12 years ago

dimon777 commented 12 years ago

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

cumulusdev commented 12 years ago

thanks, the FAQ was out-dated, I have fixed it ;-) Confirm me that it works now.

dimon777 commented 12 years ago

I don't see that FAQ is updated - same code for relay function!

dimon777 commented 12 years ago

The cirrus apps works!!! Awesome! I've missed ":", sorry :)