Page 1 of 1

submitRecordedClip and onClipAdded

Posted: 18 Mar 2010, 13:13
by od1_fr
Hello !
I'm trying to make some video recorder with avClipManager, and i have some trouble with the onClipAdded event :
When i submit the recorded clip with submitRecordedClip, it doesn't seems to fire the event, but the clip is well recorded on the server streams folder.

I have no idea why it happen, but here are some stuff i can tell :
- I use a complex clip list, linked with a database, so i don't use the listing methods of avClipManager.
- the flv files are maybe not very well recorded, cause VLC player crash when playing it.

Have any idea ?
Thx a lot !

Posted: 19 Mar 2010, 10:05
by Bax
Actually I have no ideas :)
The submitRecordedClip method stops the a/v clip recording and makes the RedBox server-side extension save the clip properties and add it to the clips list.
Then, if the submission is successful, the server-side extension sends a message to the client which in turn fires the onClipAdded event.
Maybe something is happening on the server-side, causing the "success" message not to be sent to the client. Maybe you can modify the server-side source code adding some log messages to understand what happens.

Posted: 19 Mar 2010, 11:15
by od1_fr
Hi Bax, thank you for the answer !
I will try what you suggest to me on the server, but according to what you say :
the RedBox server-side extension save the clip properties and add it to the clips list.
Then, if the submission is successful, the server-side extension sends a message to the client which in turn fires the onClipAdded event.

if i don't use the avClipManager cliplist (for example, i use a database instead of the getClipList() to get my clip list), is it possible that the onClipAdded event isn't fired because of that ?

Posted: 19 Mar 2010, 13:33
by Bax
I'm not sure. The clip list is handled by the RedBox internally. Did you change the RedBox source code?

Posted: 19 Mar 2010, 15:36
by od1_fr
No, i didn't.

Posted: 19 Mar 2010, 15:52
by Bax
No other ideas. Try to understand why that event is not fired by monitoring the messages exchanged between the client and the server.

Posted: 19 Mar 2010, 16:14
by od1_fr
Ok i'll investigate that way :)
Thx !

Posted: 12 Apr 2011, 16:48
by benje
I am also having this problem..

I am recording a clip using AVClipManager and then using the submitRecordedClip(properties) function to submit it to the redbox server, however I am not getting a callback event using "onClipAdded". Which I would expect to recieve.

Also the clips are not showing up in the SmartVideoClip Player example provided with the SFS install - despite the FLV and Prop files being generated and playing fine in the redbox streams folder.

Any help with why this is happening would be much appreciated :)

Posted: 12 Apr 2011, 22:15
by Bax
No errors on the server-side, caused by the RedBox extension?

Posted: 13 Apr 2011, 10:43
by benje
Nope there wern't any errors on the server side, but I managed to figure out what the problem was..

It wasn't receiving the onClipAdded callback event because you have make a request to view the clip list to be "included" in the users who receive the callback. It's weird and not how any of the other callbacks work, but it seems to fix the problem.

To recap.. if your not getting the "onClipAdded" callback, when you first instantiate the AVClipManager, make this call..

avClipMan.getClipList()