are you receiving a NetConnection.Connect.Success event? the nonces (on the NetConnection object) will/can only be generated when the RTMFP connection opens -- it is derived from cryptographic material negotiated during session startup.
Yes, I am. But for some reason, not the nearNonce... This is my output:
You are connected to CB!
You are now transmitting video
Your nearID: f5f7a37489e23107355c47bb3b93ae05611ae8cddf37e455e34918c1b14798a8
Your info: currentBytesPerSecond=0 byteCount=0 maxBytesPerSecond=0 audioBytesPerSecond=0 audioByteCount=0 videoBytesPerSecond=0 videoByteCount=0 dataBytesPerSecond=0 dataByteCount=0 playbackBytesPerSecond=0 droppedFrames=0 audioBufferLength=0 videoBufferLength=0 dataBufferLength=0 audioBufferByteLength=0 videoBufferByteLength=0 dataBufferByteLength=0 srtt=0 audioLossRate=0 videoLossRate=0 metaData=null xmpData=null uri=rtmfp://p2p.rtmfp.net/43bd9134c43e1c95dba9ef1a-XXXXXXXXX/ resourceName=null isLive=true
You are now in the meeting room
if you're trying to get the nearNonce from the NetStream of a 1:1 (directConnections) stream, then you need to get it from the peer NetStream, not the original publishing one.
if you're trying to get the nearNonce from the NetConnection object, then 1) that should work and 2) that's not very interesting when connecting to Cirrus.
note that there are no nonces on group (multicast) NetStreams.
It's weird, because it worked before, but then it stopped working.. I also used the new cirrus service.
protected function NetStatusHandler(e:NetStatusEvent):void
statusMsg( e.info.code );
connectButton.enabled = false;
statusMsg("You are connected to CB!");
//trace("You are now transmitting video");
statusMsg( "" );
statusMsg( "You are now transmitting video" );
connectButton.label = "Connected";
streamConnected = true;
userNearID = netConnection.nearID;
//statusMsg("Your audioReliable: " + outgoingStream.audioReliable);
//statusMsg("Your audioSampleAccess: " + outgoingStream.audioSampleAccess);
//statusMsg("Your backBufferLength: " + outgoingStream.backBufferLength);
//statusMsg("Your backBufferTime: " + outgoingStream.backBufferTime);
//statusMsg("Your bufferLength: " + outgoingStream.bufferLength);
//statusMsg("Your bufferTime: " + outgoingStream.bufferTime);
//statusMsg("Your bufferTimeMax: " + outgoingStream.bufferTimeMax);
//statusMsg("Your bytesLoaded: " + outgoingStream.bytesLoaded);
//statusMsg("Your bytesTotal: " + outgoingStream.bytesTotal);
//statusMsg("Your checkPolicyFile: " + outgoingStream.checkPolicyFile);
//statusMsg("Your client: " + outgoingStream.client);
//statusMsg("Your currentFPS: " + outgoingStream.currentFPS);
//statusMsg("Your dataReliable: " + outgoingStream.dataReliable);
//statusMsg("Your farID: " + outgoingStream.farID);
//statusMsg("Your farNonce: " + outgoingStream.farNonce);
//statusMsg("Your inBufferSeek: " + outgoingStream.inBufferSeek);
statusMsg("Your nearNonce: "+ outgoingStream.nearNonce);
statusMsg("Your nearID: " +netConnection.nearID);
//trace("FarID for closed connection: " + e.info.stream.farID);
statusMsg( "FarID for closed connection: " + e.info.stream.farID );
if(e.info.stream.farID != userNearID)
if(netStreamClosed == false)
netStreamClosed = true;
protected function initSendStream():void
//reset values... maybe if you get disconnected...?
incomingString = "empty";
outgoingString = "empty";
outgoingStream = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
statusMsg("Your info: " + outgoingStream.info);
Is there something I'm doing wrong or do you need more info?
where you're doing statusMsg("Your nearNonce: "+ outgoingStream.nearNonce), you're using the main publishing NetStream rather than the per-peer sub-NetStream. cycle the through the "peerStreams" on outgoingStream and show the nearNonces of those.
also, don't publish your developer key. i XXXXXXX-ed out part of it in your post above.
The peerStreams didn't output anything. There's also something weird happening. I tried out the cirrus sample with two computers on the network at http://labs.adobe.com/technologies/cirrus/samples
and they both connected (separate laptops) and the call worked and they got each other's nearID's, but they're not connecting with each other. (can't get stream from other, and the chat doesn't work). I'm going to try a different network, or two separate networks.
Here are my stats from cc.rtmfp.com for comps on my network:
knows public IP address of self [no]
public udp port # same as local UDP port # [no]
can receive from same IP address, same UDP port number [yes]
can receive from same IP address, different UDP port number [no]
can receive from different IP address, different UDP port number [no]
can send to different IP address after server introduction [yes]
source ip address is preserved from original connection [yes]
source udp port number is preserved from original connection [yes]
your cc result shows a port restricted cone NAT. if both computers are behind the same NAT, P2P could fail for a number of reasons including:
* the peers don't know their behind-NAT IP addresses and can't report them to Cirrus (Flash Player for Chrome Pepper has this problem)
* one or both peers have a local firewall
given the report from cc above, i would predict P2P should work with one computer behind that NAT and a peer on a different network, as long as the peer isn't behind a symmetric NAT (different translations for each peer).