I need help for your videoconference

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

Moderators: Lapo, Bax

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

Re: I need help for your videoconference

Postby supermk88 » 23 Nov 2012, 23:22

now have try my brother and it work for 1 hour, maybe the problem was that i have a game opened and my computer have problem to have game and cam opened?
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: I need help for your videoconference

Postby supermk88 » 24 Nov 2012, 10:40

The strange thing is that when i become freeze i can continue to show the webcam but when some user speak in the public chat (and i don't read) after some second other user see that i being disconnected (but i remain freeze and don't see the disconnect message)
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: I need help for your videoconference

Postby rjgtav » 24 Nov 2012, 13:43

Hi,

The redBox API uses a different connection from the SFS one. If the webcam freezes, I would say that you are losing your connection to the Red5 server, can you confirm that?
When you also stop being able from joining rooms and chatting, I would say that it is when you lose the connection to the SFS.
Please make sure that you're listening to both the disconnection events.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: I need help for your videoconference

Postby supermk88 » 24 Nov 2012, 14:19

Hi ^^
No the webcam was freeze only when i build the conference on my computer with my own server, now that i use a professional server i can the webcam never become freeze, (my brother see my webcam and i see him also if we are freeze), but when somebody try to write on public (i have try after 20-30min with a new user) we become disconnected and he see that we left the chat (and the webcam unpublished), but we don't notice that we are being disconnected if we don't try to write something or join another room :P so i think that crash the sfs not the redbox for some strange reason and the only way is to restart the page. I have try without open the webcam (so more easy for the browser and it disconnect normally after 1 hour)

edit: i know that is an easy question but there is an easy way to know if an user have published the webcam? in this cycle

Code: Select all

for each(var u:User in room.getUserList()) {
    if ("user have published webcam"){
        provider.addItem( {label:"@ " + u.getName(), data:u.getId()} )
    }
    else{
        provider.addItem( {label:u.getName(), data:u.getId()} )
    }
}


i have use the cycle "for each (var liveCast:LiveCast in avCastMan.getAvailableCasts())" with the " if (liveCast.userId == userList.selectedItem.data) " and break; if he found but i think there is another way that cost less memory.. do you know it?^^ Thx for answer ^^
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: I need help for your videoconference

Postby rjgtav » 24 Nov 2012, 19:59

Well, the server isn't crashing, as you are able to reconnect after simply refreshing the browser.
Which means that you're losing your connection, from SFS, from RedBox, or both.
As you say that you are disconnected when you try to join a room or chat, I'd bet that you're being disconnected from SFS for being idle. The solution for this is to run a small timer which sends a simple packet to the server at a higher rate than the maximum time allowed to be idle.
Please check both the server and Red5's logs.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: I need help for your videoconference

Postby supermk88 » 24 Nov 2012, 22:16

Hi wow it work :D very thx ^^ i have put a timer of 15sec with smartFox.sendString("c").
For the other question do you know an easy way to know if a selected user have opened the webcam without do the cycle of all webcam opened to find it?thx again :)
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: I need help for your videoconference

Postby rjgtav » 24 Nov 2012, 23:17

I can't check it right now but I think you can store an object as the data parameter of the list's item.
If it is possible, you can simply do data:{uId: u.getId(), webcam:true}.
And you don't need to send the simple packet at a such high rate. Check in SFS's config.xml file the <MaxUserIdleTime> setting, which is in seconds. Then configure the timer to be just a little higher than that. For example, if the setting is 300 seconds, the timer can run at something like every 250s
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: I need help for your videoconference

Postby supermk88 » 25 Nov 2012, 15:28

Hi ^^ i have try but it don't work :(

I have try also to store variable so: var userWebcam:String = u.getVariable("$RB_castId").getStringValue();
and then try to write but it don't work.. where i have wrong?^^

edit: var uVars:String = u.getVariable("$RB_castId");
ok with this code it run ^^

i have the last problem.. i have put that code every time i join a room, every time an user come into a room, but how can i put a listener each time the cast id variable is update? thx ^^

i have put this simple code on joinConference function

Code: Select all

   for each (var liveCast:LiveCast in avCastMan.getAvailableCasts())
   {
      
      
   }


and then the

Code: Select all

public function onLiveCastPublished(evt:RedBoxCastEvent):void
{
   var liveCast:LiveCast = evt.params.liveCast
   ...
   
}


and seem to work perfectly but i don't know if is the right code to use.. without the empty code in the joinConference i don't know why don't work the onliveCastPublished function
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: I need help for your videoconference

Postby supermk88 » 22 Dec 2012, 00:53

Hi, i ask here because i think is the right section, i have finish the videoconverence but i have a problem.. if someone click on deny when appear the message and then he want publish the webcam he must click with right click in the screen and then settings, but can i create a button in the chat for open that window without right clict in the screen?thx for answer :)
User avatar
Bax
Site Admin
Posts: 4393
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: I need help for your videoconference

Postby Bax » 22 Dec 2012, 12:59

supermk88 wrote:Hi, i ask here because i think is the right section, i have finish the videoconverence but i have a problem.. if someone click on deny when appear the message and then he want publish the webcam he must click with right click in the screen and then settings, but can i create a button in the chat for open that window without right clict in the screen?thx for answer :)

This is not related to SFS or the RedBox, but to the generic Flash behavior. Please search the web for dedicated support forums.
Paolo Bax
The SmartFoxServer Team
supermk88
Posts: 239
Joined: 18 Mar 2011, 12:30

Re: I need help for your videoconference

Postby supermk88 » 24 Mar 2013, 13:52

Hi i have resolve that problem but i have an other one about the same thing.. I have use the uservars for see if an user have the webcam and then change his name with a @ near the name.. When i join a room it work good but when an user open or close his webcam i don't know what function i must use.. i have try with this:

public function updateUser():void{

var provider:ArrayCollection = new ArrayCollection()

for each(var u:User in stanza.getUserList()) {

var uVars:String = u.getVariable("$RB_castId");

if (uVars == null)
provider.addItem( {label:u.getName(), data:u.getId()} )
else
provider.addItem( {label:"@ " + u.getName(), data:u.getId()} )

}

// Add a sort field to the room list component. Names will be sorted alphabetically
if (provider.sort == null)
{
var sort:Sort = new Sort()
sort.fields = [new SortField("label")]

provider.sort = sort
}

provider.refresh()
userList.dataProvider = provider
}

but this delete all the userlist and then create it again and for example if there are much users and i use the scrollbar for find a specific user every time an user open or close the webcam then the scroll bar move up (hope that you have understand). I want something like userjoin or user leave that don't need to delete all the userlist (sorry for english)


EDIT: I have mix the code of user enter and user leave can you tell me if is correct?In onlivecastunpublished function i have write:

var liveCast:LiveCast = evt.params.liveCast

trace ("L'utente " + liveCast.username + " ha chiuso la webcam")

var provider:ArrayCollection = userList.dataProvider as ArrayCollection

for each (var o:Object in provider)
{
if (o.data == liveCast.userId)
{
provider.removeItemAt(provider.getItemIndex(o))
provider.addItem( {label:liveCast.username, data:liveCast.userId} )
break
}
}
provider.refresh()
userList.invalidateList()

I have use liveCast.username and Livecast.userId instead of user.getname and user.getid is the same thing right? i have try it and seem work good..
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: I need help for your videoconference

Postby rjgtav » 25 Mar 2013, 12:11

Hello,

When you receive the onUserVariablesUpdate event you can retrieve and edit the UserList's dataProvider, and so you don't need to rebuild it from scratch.
On google you can find some documentation regarding the ListBox component (if I'm not mistaken that's the one that is being used)

Cheers
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “RedBox”

Who is online

Users browsing this forum: No registered users and 1 guest