compiling Redbox examples

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

Moderators: Lapo, Bax

User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 27 Apr 2009, 15:21

Carl Lydon wrote:I don;t see any config file inside redbox folder or example folder. Are you saying I should edit the main config file for smartfox? I thought you could point redbox to any server you wanted, and I don't see a special line for the redbox ip in the main config.

Sorry, I thought you were referring to the AS3 version of RedBox examples, which make use of a client-side xml configuration file that can be used instead of setting the ip, port, debug and a bunch of other SmartFoxClient properties manually.
Anyway... the AS2 version of RedBox examples make use of the SmartFoxBits components. In order to set the ip address of the SmartFoxServer instance to which the example should connect to, you have to edit the Connector properties. The RedBox will use the same ip address to connect to Red5.
Paolo Bax
The SmartFoxServer Team
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Postby Carl Lydon » 27 Apr 2009, 16:24

Ok, that would explain it!

Previously, I'd tried to just change the ip setting for an object I found within the example, but it didn't work.

Now, my chat project already has it's own login system, and doesn't use smartfox bits at all. Will this interfere with my main project? How hard is it to strip away all the stuff I don't need, say, from the "smartVideoClipPlayer.fla" example?
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Postby Carl Lydon » 27 Apr 2009, 17:53

How do you set the zone with the smartfox connector bitz? There's no parameter for that.
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Postby Carl Lydon » 27 Apr 2009, 19:01

So I just ported all my custom connection scripts into the demo, and can no connect properly to my server, but now it's saying that I have to have the smartfoc bits connector instance even when I'm not using it to connect? IS there any way to no need that? I'd rather not use any of the bitz, if I can get away with it.

So, I re-added the bitz connector and it's tracing:

Code: Select all

SmartFoxClient.myUserId and/or SmartFoxClient.myUserName properties not set: in case of custom login they must be set manually to the actual server values


So I tried doing this:

Code: Select all

smartFox.myUserName = gUserName;
smartFox. myUserId = gUserID


where smartFox is my client instance, and I hold the name and Id in those 2 variables.

Just keeps tracing that these values are not set.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 28 Apr 2009, 06:24

Carl Lydon wrote:Now, my chat project already has it's own login system, and doesn't use smartfox bits at all. Will this interfere with my main project? How hard is it to strip away all the stuff I don't need, say, from the "smartVideoClipPlayer.fla" example?

As described in the SmartFoxBits documentation, all those components need the Connector to work. So if you want to remove it and substitute with your own connection handling system, you have to remove all the SmartFoxBits.

Anyway, this is out of the scope of this support forum: your initial support request was about issues you were having in making the RedBox connect successfully to the Red5 instance on your live server. Please let's go on with this.

In other to understand what is going on, we would like you to test our example just like it is provided, without modifications, as we are sure that its code works.

I've already explained how to change the ip address on the Connector instance. If you also need to change the zone, you will find this parameter among the LoginBox component properties.
Paolo Bax
The SmartFoxServer Team
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Postby Carl Lydon » 28 Apr 2009, 13:05

I'm fine with having to keep the component, and I understand you don't want to delve into that, but I mentioned another problem roadblock to getting the example to work with my server.

I did port all my connection stuff into the example, and I was able to connect to smartfox successfully and join a room.

After doing so , I grabbed the username and ip, and tried to add those properties to the smartfox instance, which I guess the example needs to work:

Code: Select all

smartFox.onJoinRoom = _root.onJoinRoom;
function onJoinRoom (roomObj:Room) {
        //bunch of other stuff
        smartFox.myUserName = gUserName;
        smartFox.myUserId = gMyUserID;
        trace ("name = " + smartFox.myUserName);
        trace ("vID = " + smartFox.myUserId);
   initializeAV();
}



But when I call InializeAV() I get:

Code: Select all

SmartFoxClient.myUserId and/or SmartFoxClient.myUserName properties not set: in case of custom login they must be set manually to the actual server values



So my question is only "how do I set those values (myUsername and myUserID ) properly?"
User avatar
Carl Lydon
Posts: 298
Joined: 12 Nov 2007, 16:15
Location: NYC
Contact:

Postby Carl Lydon » 28 Apr 2009, 13:23

Ok, I tried to do it your way and only use the smartfox bits, but because my server has a custom login and zones so it doesn't work, so I need to login the way I was doing it. Do I need to make the "SmartfoxChatAV" zone fro this to work at all?
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 28 Apr 2009, 13:33

To make the example work, simply copy the Zone configuration for that example to your live server, instead of adapting to your custom code.

Anyway, about those two parameters (myUserName and myUserId): you have to make your server-side extension return them in the response to your custom login request. Then set them just like you already do, but in the response handler, not in the joinRoom event handler.
You can find an example here: http://www.smartfoxserver.com/docs/docPages/sfsPro/javaCookBook.htm (check recipe #1)
Paolo Bax
The SmartFoxServer Team
User avatar
JarochoCity
Posts: 180
Joined: 01 Dec 2005, 01:22
Location: Mexico
Contact:

without smartfoxbits

Postby JarochoCity » 01 May 2009, 23:40

Is there a way of using this AS 2.0 withouth using the smartfox bits?

When i try it says:

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

But i dont want to use the smartfoxbits
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: without smartfoxbits

Postby Bax » 02 May 2009, 09:54

JarochoCity wrote:Is there a way of using this AS 2.0 withouth using the smartfox bits?
When i try it says:
The RedBox AS2 API require an instance of the SmartFoxBits Connector to work properly.
But i dont want to use the smartfoxbits


Please do not double post!

The RedBox AS2 requires the SmartFoxBits Connector (due to the way the Connector handles and dispatches SmartFoxServer events). You can remove all the other martFoxBits, but you will need to use at least the Connector (and stick to its event handling system). Please notice that you don't need to buy a license to use the Connector, and it doesn't display the "powered by" logo like the other Bits.
Paolo Bax
The SmartFoxServer Team

Return to “RedBox”

Who is online

Users browsing this forum: No registered users and 29 guests