1

Am building a video chat application and i was wondering if there are any native events for the NetStream that fire , that can help in detecting when a remote client starts/stops streaming video over his outgoing stream (NetStream) to which the other client has subscribed over P2P/RTFMP in AS3 ?.

I maybe able to dispatch custom messages since the two clients are already connected, but i don't want to add the extra overhead.

Khalid Bajwa
  • 173
  • 3
  • 11

1 Answers1

2

All the event codes for NetStatusEvent can be found here

You just need to have the listener set up and look for "NetStream.Play.Start" and "NetStream.Play.Stop"

e.g.

private function netStatusHandler(event:NetStatusEvent):void
{
// handles net status events
switch (event.info.code)
{
case "NetConnection.Play.Start" :

//do stuff

break;
}
}
  • I Obviously tried that, but these events relate to Playing/Stopping of NetStreams and NOT the video stream that is being streamed over them. I do not want to break the NetStream connection, just toggle video streams over them. – Khalid Bajwa May 02 '11 at 02:08
  • I am sorry that wasn't what you where looking for. If the event codes do not suffice you may be able to use SharedObject [link](http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html) but you may have to go a bit further and dig into server side actionscript [link](http://help.adobe.com/en_US/flashmediaserver/ssaslr/index.html) This book goes into detailed examples of how to use SASS [link](http://oreilly.com/catalog/9780596515904) – Thomas Brasington May 02 '11 at 10:33