as2 avchat returning error

Post your questions and bug-reports about the audio/video streaming add-on based on Red5 Media Server.

Moderators: Lapo, Bax

laysz
Posts: 4
Joined: 22 Feb 2010, 08:16

as2 avchat returning error

Postby laysz » 22 Feb 2010, 08:26

Hi,

The RedBox AS2 API require an instance of the SmartFoxBits Connector to work properly.

I am trying to implement a web cam into the tic tac toe game but what if I do not want to use the mc_connector. Can I sitll use the AVChatManager? If I can't use this, what is the easiest way I can set up a web cam between two people. With the sftrix (tic toe) example, the two people joined a room and it's assumed that they want to set up web cam chat.

The failure occurs when I call this. I noticed in the .as examples it does this as well but I don't see it use the mc_connector:

function initializeAV():Void
{

// Create AVChatmanager instance
avChatMan = new AVChatManager(smartfox, red5IpAddress, true)

avChatMan.addEventListener(RedBoxChatEvent.onAVConnectionInited, onAVConnectionInited)
avChatMan.addEventListener(RedBoxChatEvent.onAVConnectionError, onAVConnectionError)
avChatMan.addEventListener(RedBoxChatEvent.onChatRequest, onChatRequest)
avChatMan.addEventListener(RedBoxChatEvent.onChatRefused, onChatRefused)
avChatMan.addEventListener(RedBoxChatEvent.onChatStarted, onChatStarted)
avChatMan.addEventListener(RedBoxChatEvent.onChatStopped, onChatStopped)

inited = true
}

Please help,

Thanks in advance!
laysz
Posts: 4
Joined: 22 Feb 2010, 08:16

One more thing

Postby laysz » 22 Feb 2010, 08:43

This is what I use to connect to SF server instead of the mc_connector. The .AS example does not use the mc_connector as well.

var ip:String = "127.0.0.1" //"99.244.61.79"
var port:Number = 9339
var zone:String = "sftris"

var smartfox:SmartFoxClient = new SmartFoxClient()
smartfox.onConnection = handleConnection
smartfox.debug = true

// Connect to the server
smartfox.connect(ip, port)
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 24 Feb 2010, 15:25

The RedBox is supposed to use the SmartFoxBits connector. If you don't want to use it, you should modify the RedBox classes source code to change its behavior.
Paolo Bax
The SmartFoxServer Team

Return to “RedBox”

Who is online

Users browsing this forum: No registered users and 5 guests