problem with smartfox2x example

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

Moderators: Lapo, Bax

supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

problem with smartfox2x example

Postby supermk88 » 05 Dec 2013, 01:13

Hi again, i'm watching the example of redbox and trying to compile the source code but i get the error that i don't have smartfoxbits component, is possible to compile it without using smartfoxbit or is too long to change the code?thx for answer ^^
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: problem with smartfox2x example

Postby Bax » 05 Dec 2013, 09:50

Actually the SmartFoxBits library is distributed together with the examples (SmartFoxBits2X_BasePack.swc file in the libs folder). Maybe you didn't link that sec in your project?
Paolo Bax
The SmartFoxServer Team
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 05 Dec 2013, 15:42

Hi thx i forgot to link the library with that swc file.. but now when i try to compile it (there aren't error) in the login window when i insert an username and click login nothing appen (i use flex builder 3 and there aren't server problem, if i use your example all work good)
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 05 Dec 2013, 16:24

ok i think that i resolve, i use an old flex sdk (i see another post with the same problem and he resolved by use a new flex sdk)
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 05 Dec 2013, 16:40

Ok it works :D but i have a question, i have read that for remove the powered logo i must buy the smartfox 2x license, but also for smartfox bit component used in that example i must buy the license for remove the logo or is sufficient the smartfox2x license? thx for answer ^^
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: problem with smartfox2x example

Postby Bax » 05 Dec 2013, 16:50

SmartFoxServer and SmartFoxBits have separate licenses.
If you want to remove the "powered by" from inside the Bits, you have to buy a SmartFoxBits license.
For SmartFoxServer, if you use the free Community Edition, your game/application must display the SmartFoxServer logo clearly. If you buy a SmartFoxServer license this is not needed anymore.
Paolo Bax
The SmartFoxServer Team
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 05 Dec 2013, 17:25

Ok thx ^^ but i can edit the redbox example (like change the bits component with one that use other as3 example without the logo) or that example run only with sfbits component?
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: problem with smartfox2x example

Postby Bax » 06 Dec 2013, 11:17

All the examples using the SmartFoxBits show the "powered by", so I'm not sure what you mean.
Unless you remove the Bits completely, but in this case you have to recreate the same features from scratch.
This of course can be done and it is up to you.
Paolo Bax
The SmartFoxServer Team
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 09 Dec 2013, 16:58

Thx i have done my login and remove all sfbits component and it work perfectly :D sorry if i ask here but i have another problem, i need to change the webcam resolution of this example (because users are habit to use 4:3 webcam and here is 16:9 and picture are fat :P in previous version of smartfox i changed it in the avcastmanager.as but here i found only the redbox swc file.. how can i do? thx ^^
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: problem with smartfox2x example

Postby Bax » 10 Dec 2013, 08:26

Can you describe what changes in the previous avcastmanager.as did you do to modify the aspect ratio?
Because I think this should be made on the Video object you instantiate, to which the camera output is attached.
Paolo Bax
The SmartFoxServer Team
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 10 Dec 2013, 09:16

Sure, i have edit the function publishLiveCast into the avcastmanager so:

if (enableCamera){
var _camera:Camera = Camera.getCamera();
if (_camera) {

var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1);
_camera.setQuality(10000, 0);
camera.setMode(320, 240, 30, true);
myLiveCast.videoStreamSettings = h264Settings;
trace(myLiveCast.videoStreamSettings.codec + "," + h264Settings.profile + "," + h264Settings.level);

myLiveCast.attachCamera(_camera)
} else {

}
}

rjgtav say to do so but it was in the smartfox 1x and i had the as source to edit.. (i don't need to change the quality or use another codec i want only set the resolution 320x240 using camera.setMode).
In the redbox2x example instead i don't find the publish live cast function.. there is the function

public function onStartAVChatBtClick(panel:PrivateChatTab):void
{
if (avChatMan != null && avChatMan.isConnected)
{
var session:ChatSession = avChatMan.sendChatRequest(AVChatManager.REQ_TYPE_SEND_RECEIVE, panel.userId, true, true);

if (session != null) // session is null if the same request to the same recipient has already been submitted before (and is still valid)
{
panel.connId = session.id;
panel.showMyVideo(Camera.getCamera());
enableStartAVButton(panel, false);
showSystemMessage(panel, "Hai invitato " + panel.userName + " ad accendere la sua webcam e/o microfono");
}
}
else
showSystemMessage(panel, "IMPOSSIBILE AVVIARE LA VIDEOCHIAMATA. AGGIORNA LA PAGINA E RIENTRA");
}

maybe i can change here the resolution? can you tell me how?
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: problem with smartfox2x example

Postby Bax » 10 Dec 2013, 10:05

You always have access to the Camera object in your code, so you should be able to do it without the need to edit the source files.
Simply do the following:

Code: Select all

Camera.getCamera().setMode(320, 240, 30, true);

I think you can do it at any time, for example just before publishing the user live cast.
Paolo Bax
The SmartFoxServer Team
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: problem with smartfox2x example

Postby supermk88 » 10 Dec 2013, 11:15

Hmmm i have try that code and get a error..
i have also try to set
var cam:Camera = Camera.getCamera();
cam.setMode(1024, 768, 30, false);
panel.showMyVideo(cam);

but i get black screen instead of the webcam.. so avcastmanager is only inside the redbox.swc and i can't take it?
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: problem with smartfox2x example

Postby Bax » 11 Dec 2013, 09:17

I'd suggest to make a separate test. Without using the RedBox API (only the normal Flash AS3 API) create a new project and try attaching the camera object to a video on the stage. Then try your settings.
Paolo Bax
The SmartFoxServer Team

Return to “RedBox 2X”

Who is online

Users browsing this forum: No registered users and 5 guests