Hi, I wrote the following code to view a live streaming from my webcam with
FMS installed and started : import flash.media.Camera; import
fl.video.VideoPlayer; ////////////////////////////////////////////////////////
var the_cam:Camera = Camera.getCamera(); var the_nc = new NetConnection();
the_nc.connect('rtmp://localhost/webcam');
the_nc.addEventListener(flash.events.NetStatusEven t.NET_STATUS,onConnection);
function onConnection(evt : flash.events.NetStatusEvent) {
trace(evt.info.code+' '+the_cam.name); //on créé un objet NetStream qui
publis la video en 'live' sans l'enregistrer sur le serveur var in_ns = new
NetStream(the_nc); in_ns.attachCamera(the_cam); //on publie et on nomme notre
video (laVideo) in_ns.publish('laVideo','live'); ///////////////////////////
//on créé un autre objet pour diffuser la video var out_ns = new
NetStream(the_nc); //on la joue out_ns.play('laVideo'); var
Live_vc:Video=new Video(); this.addChild(Live_vc);
Live_vc.attachNetStream(out_ns); } The connecyion to server is done but I get
a blank screen. Why? Thanks, pascal