If you listen for a MediaErrorEvent (either on MediaPlayer or the MediaElement, depending on which you're using), you can drill down into the MediaError that is associated with the event. MediaError's errorID property will be one of the values in org.osmf.events.MediaErrorCodes. For Play.StreamNotFound, you should get errorID == MediaErrorCodes.NETSTREAM_STREAM_NOT_FOUND. There are a variety of error IDs for NetConnection errors (e.g. MediaErrorCodes.NETCONNECTION_REJECTED).
Thanks Brian, I'd missed errorID in the docs, it being inherited from the superclass.
A couple observations:
1. It appears that an instance of MediaError sometimes has null for its detail property. An example case was where I wanted to trigger a failure by connecting to rtmp://www.xxx.com/foo. Other bad paths (rtmp://www.cnn.com/foo) appear to timeout and have a detail of "Failed to establish a NetConnection within the timeout period of 10000 ms." I notice that string is nowhere in the 0.93 source, so maybe it's a player issue.
2. The MediaErrorCodes constants in the docs at this URL do not match what they are in the 0.93 source: http://help.adobe.com/en_US/OSMF/1.0/AS3LR/org/osmf/events/MediaErrorCodes.html
// case MediaErrorCodes.NETSTREAM_STREAM_NOT_FOUND:
// case MediaErrorCodes.NETSTREAM_NO_SUPPORTED_TRACK_FOUND:
// case MediaErrorCodes.NETSTREAM_PLAY_FAILED:
// case MediaErrorCodes.NETSTREAM_FILE_STRUCTURE_INVALID:
As for #2. Wow, what a funny way to find out you've released 0.95! Congrats!
1. Yes, detail will often be null, as it's only set when there's detail beyond what the base message property provides. (The message property is also inherited from the Error superclass, so you might have missed that in the docs.)
2. Yep, we just shipped v0.95 (yay!), the posted docs should be in sync with the latest release.