OpenRTMFP / Cumulus

CumulusServer is a complete open source and cross-platform RTMFP server extensible by way of scripting
http://groups.google.com/group/openrtmfp-cumulus
GNU General Public License v3.0
593 stars 221 forks source link

onPublish() Eventhandler never initiated #61

Closed ckabus closed 12 years ago

ckabus commented 12 years ago

Hi folks,

when I call netstream.publish("my_stream"); from inside my Flex Application I never get the onPublish(client,publication) Event on the Cumulus side.

Did I oversee any issues? How do you catch the publishing Events?

Greetings from Germany C. Kabus

cumulusdev commented 12 years ago

Your NetStream is a P2P netstream?

ckabus commented 12 years ago

Yes it is a P2P Stream,

The following Code openes my Stream for publishing:

private function openPublishNetstream():void {

if (netConnection) { // caller publishes media stream outgoingStream = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS); outgoingStream.addEventListener(NetStatusEvent.NET_STATUS, outgoingStreamHandler); }
// Publish Stream and attach Camero Object to it outgoingStream.publish("chat_stream"); if(camera) { outgoingStream.attachCamera(camera); status("VIDEO IS PUBLISHED NOW!\n"); } }

I see all Videostreams which I have published with this function call, and my Flex Eventhandler 'outgoingStreamHandler()' successfully catches the 'NetStream.Publish.Start' event. But on the server side I never get the onPublish(..)

I really appreciate all help!

Thanx Ckabus

cumulusdev commented 12 years ago

It's completly normal so, in a P2P way the server see nothing. These "publication/subscription" events happens only when you use a NetStream connected to the server, of course:

outgoingStream = new NetStream(netConnection, NetStream.CONNECT_TO_FMS);

Here events will be called on server side... in client to server case... no in P2P case.