by "stream id" do you mean a peer ID for 1:1 P2P communication, or a client-server publish to FMS?
if you mean "can i tell that a particular peer is still connected to the Cirrus service?", then the answer is "not directly". if you mean "can i tell if a named stream is currently being published to FMS?", you'll need to ask on the FMS forum.
I mean peer id for p2p.
" if you mean "can i tell that a particular peer is still connected to the Cirrus service?", then the answer is "not directly" "
What do u mean by not directly?
And what about experation? does a peer id have expiration date? if i publish for instace a peer id. can i play that stream after a week?
1 person found this helpful
by "not directly" i mean there is no API for asking Cirrus "is a given peer ID currently connected". the only way to really tell is to try to make a P2P connection to that peer and see if it succeeds.
peer IDs don't "expire" exactly. a peer ID exists for as long as that peer's NetConnection is connected to a server (such as Cirrus). when you close the NetConnection, the peer ID is destroyed. it no longer exists and will never be re-used.
P2P streams are always live. a stream exists as long as a peer is actively publishing it. if the publishing peer stops publishing a P2P stream, or if the publishing peer goes away, then the stream is no longer available from that peer.
Do you perhaps know what will actullay happen in the action script code when i try to connect to a stream that dosent exists? does it throw some kind of excpetion or raises an event?
if you connect to an active valid peer ID but NetStream.play() an invalid stream name, nothing will happen (just like if you had done that with FMS). the reason is that peer could publish that named stream in the future, and that's OK.
if you specify a bad or dead peer ID, you will eventually (after a timeout of about 90 seconds) get a NetStream.Connect.Closed event. likewise you'll get that event if you were connected to a peer but that peer then goes away.