redbox RedBoxCastEvent's don't work?

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

Moderators: Lapo, Bax

fastboy619
Posts: 18
Joined: 31 Mar 2013, 04:16

redbox RedBoxCastEvent's don't work?

Postby fastboy619 » 12 Oct 2013, 23:33

so i have everything running but it seems like the onPublish function doesn't want to run at all when i added the event listeners imported the classes and created the functions

Code: Select all

[RedBox] Initializing Live Casts list for current room...
[RedBox] NetStatusEvent response received
[RedBox] Level: status | Code:NetConnection.Connect.Success
[RedBox] NetConnection successful
[RedBox] User own live cast published; id: 43_20131012225919984_46
[RedBox] Red5 connection initialized

so the traces show that the casts do get published but i don't see the onPublish running and avCastMan.getAvailableCasts() is always empty.

basically mine is the opposite of this thread:http://www.smartfoxserver.com/forums/viewtopic.php?f=24&t=13364
i get the initialize function to be fired but the published function does not fire. i'm guessing you guys didn't actually try to fix it?
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: redbox RedBoxCastEvent's don't work?

Postby Bax » 14 Oct 2013, 07:58

Are you testing this with one user only? When you publish the user stream, only the other users in the same Room receive the RedBoxCastEvent.LIVE_CAST_PUBLISHED event, which in turn populates the getAvailableCasts array.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: redbox RedBoxCastEvent's don't work?

Postby Bax » 14 Oct 2013, 07:59

i'm guessing you guys didn't actually try to fix it?

We have never been able to reproduce the issue described in that post, and also the user never got back to us again. So we believe he was doing something wrong in his code.
Paolo Bax
The SmartFoxServer Team
fastboy619
Posts: 18
Joined: 31 Mar 2013, 04:16

Re: redbox RedBoxCastEvent's don't work?

Postby fastboy619 » 14 Oct 2013, 20:53

Bax wrote:Are you testing this with one user only? When you publish the user stream, only the other users in the same Room receive the RedBoxCastEvent.LIVE_CAST_PUBLISHED event, which in turn populates the getAvailableCasts array.


So the user that publishes their cast don't get a LIVE_CAST_PUBLISHED? if so then how do they get their cast ID to stream their own cast to themselves?

edit: I tried with 2 users the LIVE_CAST_PUBLISHED still doesn't trigger, i'm pretty sure it's on redbox's end.
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: redbox RedBoxCastEvent's don't work?

Postby Bax » 15 Oct 2013, 08:12

Our example is based on the same events and it works, so I guess there's something wrong you are doing.
Are you sure both users joined the same Room before publishing the live cast? Also, are you calling the getAvailableCasts method in order to enable the reception of those events? Please read the AVCastmanager class description: you will find outlined the flow you should implement: http://docs2x.smartfoxserver.com/api-do ... nager.html

So the user that publishes their cast don't get a LIVE_CAST_PUBLISHED? if so then how do they get their cast ID to stream their own cast to themselves?

Receiving your own stream would just be a waste of resources. There's no need to do it: you simply have to attach the camera stream to a Video object on the stage.
Paolo Bax
The SmartFoxServer Team
fastboy619
Posts: 18
Joined: 31 Mar 2013, 04:16

Re: redbox RedBoxCastEvent's don't work?

Postby fastboy619 » 15 Oct 2013, 19:46

i did exactly as in the video conference example it still won't trigger it just doesn't i don't know why i call the getAvailabeCasts() and they still don't trigger.

edit: got everything to work fine by going into the core sfs redbox code and changing everything, just kidding it was just that smartfox server needs things to be done in a specific order for everything to work right.. thanks tho.
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: redbox RedBoxCastEvent's don't work?

Postby Bax » 16 Oct 2013, 10:16

Can you describe what the wrong order was, so that other users might be helped too? Thank you.
Paolo Bax
The SmartFoxServer Team
fastboy619
Posts: 18
Joined: 31 Mar 2013, 04:16

Re: redbox RedBoxCastEvent's don't work?

Postby fastboy619 » 17 Oct 2013, 22:55

I fixed it by calling GetAvailableCasts() right after a user Joins even if he doesn't need it yet

Return to “RedBox 2X”

Who is online

Users browsing this forum: No registered users and 2 guests