FLVPlayback Component's ncMgr.netConnection is null when connecting to my Flash Media Server?
Hi all,
I'm trying to troubleshoot a Flash Media Server working with a little video playback application I wrote a few years ago that has suddenly stopped working. I'm using CS3/Actionscript 3. My app uses the FLVPlayback Component, and was working well last time I checked. I recevied a report that the videos stopped working, and have been looking into it. I figured I'd add a bunch of event listeners to the FLVPlayback's ncMgr.netConnection so I could get debug info on things like io errors, net status, etc. The problem I'm running into is that the netConnection is null when I set it to anything on my Flash Media Server, and adding any event listeners to this netConnection throws errors. Here's what I've tried so far:
Playback of a local FLV file works fine. In the FLVPlayback documentation, I found an example and stole the URL of the stream they were using in the example, and that works fine, although it is an HTTP protocol stream rather than RTMP. Any attempt to access FLV files on my Media Server, which has worked fine in the past, basically cause the FLVPlayback object to sit and hang in "buffering" mode and never progresses beyond this point. The netConnection object in this case is null.
Here's my code:
public function FLVPlayer(){ // CLASS CONSTRUCTOR
var v:FLVPlayback = new FLVPlayback(); // INSTANTIATE FLVPLAYBACK COMPONENT
v.width=425;
v.height=319;
v.skin = "SkinUnderPlayStopSeekFullVol.swf";
v.source = get_which_video();
trace('video source: ' + v.source);
addChild(v);
trace('netconnection: ' + v.ncMgr.netConnection);
}
private function get_which_video():String{
var v_src:String ;
v_src = "rtmp://flash.wa.gov/CAA_legislativeDay/caa_2007_reception_CBR.flv"; // URI FOR FILE ON FLASH MEDIA SERVER
v_src = "caa_2007_governor_CBR.flv"; // URI FOR LOCAL FILE
v_src = "http://www.helpexamples.com/flash/video/caption_video.flv"; // URI FROM FLVPLAYBACK EXAMPLE ON ADOBE.COM
return v_src;
}
You can see that v_src is set 3 times in the get_which_video function. By commenting out 2 and leaving one, I get the following results in my traces:
v_src = "rtmp://...":
video source: rtmp://flash.wa.gov/CAA_legislativeDay/caa_2007_reception_CBR.flv
netconnection: null
v_src = "caa_2007_governor_CBR.flv":
video source: caa_2007_governor_CBR.flv
netconnection: [object NetConnection]
v_src = "http://...":
video source: http://www.helpexamples.com/flash/video/caption_video.flv
netconnection: [object NetConnection]
Can anyone explain to me what's going on? Again the purpose of this is to troubleshoot the video streaming from the Flash Media Server, and it seems like there is no netconnection to the server being created. Does this mean that the server is not working, or is there a problem with the way I'm trying to access the content on the server? This was all working fine before, and I have set up the server-side application .ASC files and such to allow things to work fine on the server end. Any advice or suggestions are greatly appreciated.
