This is a discussion on Output non catturato da flash media server within the Actionscript 3.0 avanzato forums, part of the Flash Italiano category; Salve a tutti, ho un problema spero ke qualcuno di voi possa aiutarmi. Devo realizzare uno streaming in diretta, sto ...
Salve a tutti,
ho un problema spero ke qualcuno di voi possa aiutarmi.
Devo realizzare uno streaming in diretta, sto usando flash media server 3.5 e flash midea live encoder 3.
Configuro il server e riesco a mandare lo streaming con flash midea live al server pero' non riesco a creare un swf ke mi prelevi tale streaming in uscita. Potete aiutarmi? posto qualcosa ke ho fatto.
Praticamente io ho un oggetto FLVPlayback sullo stage e vorrei ke l'swf in questione si colleghi al server e mi restituisca il video in streaming ricevuto dal live encoder. Qualcuno ha dele soluzioni?Code:package { import flash.display.Sprite; import flash.net.NetConnection; import flash.net.NetStream; import flash.events.NetStatusEvent; import flash.media.Video; public class connect extends Sprite { var nc:NetConnection; var stream:NetStream; public function connect() { nc = new NetConnection(); player.x=100; player.y=100; nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); nc.connect("rtmp://localhost/livestreams/istanza"); } public function netStatusHandler(event:NetStatusEvent):void { trace("connected is: " + nc.connected ); trace("event.info.level: " + event.info.level); trace("event.info.code: " + event.info.code); switch (event.info.code) { case "NetConnection.Connect.Success": trace("Congratulations! you're connected"); //da qui in poi ho cercato d prendere lo streaming e darlo al player ke ho //sullo stage, ma non funziona stream = new NetStream(nc); player=new Video(); player.attachVideo(stream); stream.play("rtmp://localhost/livestreams/istanza"); // create live streams // play recorded streams break; case "NetConnection.Connect.Rejected": trace ("Oops! the connection was rejected"); // try to connect again break; case "NetConnection.Connect.InvalidApp": trace("Please specify a different application name in the URI"); // try to connect again break; case "NetConnection.Connect.Failed": trace("The server may be down or unreachable"); // display a message for the user break; case "NetConnection.Connect.AppShutDown": trace("The application is shutting down"); // this method disconnects all stream objects nc.close(); break; case "NetConnection.Connect.Closed": trace("The connection was closed successfully - goodbye"); // display a reconnect button break; } } } }
Bookmarks