Page 1 of 1

problem with smartfox2x example

Posted: 05 Dec 2013, 01:13
by supermk88
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 ^^

Re: problem with smartfox2x example

Posted: 05 Dec 2013, 09:50
by Bax
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?

Re: problem with smartfox2x example

Posted: 05 Dec 2013, 15:42
by supermk88
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)

Re: problem with smartfox2x example

Posted: 05 Dec 2013, 16:24
by supermk88
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)

Re: problem with smartfox2x example

Posted: 05 Dec 2013, 16:40
by supermk88
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 ^^

Re: problem with smartfox2x example

Posted: 05 Dec 2013, 16:50
by Bax
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.

Re: problem with smartfox2x example

Posted: 05 Dec 2013, 17:25
by supermk88
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?

Re: problem with smartfox2x example

Posted: 06 Dec 2013, 11:17
by Bax
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.

Re: problem with smartfox2x example

Posted: 09 Dec 2013, 16:58
by supermk88
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 ^^

Re: problem with smartfox2x example

Posted: 10 Dec 2013, 08:26
by Bax
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.

Re: problem with smartfox2x example

Posted: 10 Dec 2013, 09:16
by supermk88
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?

Re: problem with smartfox2x example

Posted: 10 Dec 2013, 10:05
by Bax
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.

Re: problem with smartfox2x example

Posted: 10 Dec 2013, 11:15
by supermk88
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?

Re: problem with smartfox2x example

Posted: 11 Dec 2013, 09:17
by Bax
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.