You're still not using flvplayback component...
Hi,
Drag the flvplayback component on the stage and name it to "vidplayer" in properties panel. Then you can use the following sample code :
import flash.utils.setInterval;
import flash.utils.setTimeout;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.events.*;
import fl.video.FLVPlayback;
import fl.video.VideoPlayer;
import fl.video.VideoEvent;
import flash.display.MovieClip;
VideoPlayer.iNCManagerClass = fl.video.NCManagerNative;
vidplayer.isLive = false;
vidplayer.isDVR = false;
vidplayer.source = "rtmp://localhost/vod/sample";
var videoplayer:VideoPlayer;
var flvplayback:FLVPlayback;
flvplayback = FLVPlayback(this.getChildByName("vidplayer"));
videoplayer = flvplayback.getVideoPlayer(0);
setTimeout(initMonitor,5000);
function initMonitor():void
{
if (videoplayer.netStream!=null)
{
trace("Video is playing!!");
if(videoplayer.netConnection)
{
trace("Got NetConnection!!");
}
}
else
{
trace("Main.as : " + "Not connected to FMS yet - Trying again ....")
setTimeout(initMonitor,5000);
}
}
Regards,
Amit