forum > rtmpe player

  • i xould realize a rtmpe player with the code below, i arrive to read flv when flv present in the web application but when streaming; you advice ?

    <!-- Flash -->
            <object type="application/x-shockwave-flash" id="Testflash" width="960" height="540">
                <param name="movie" value="./testhaxe.swf">
            <param name="allowScriptAccess" value="always" />
            <param name="allowNetworking" value="all" />
            <param name="quality" value="high" />
            <param name="scale" value="noscale" />
            <param name="salign" value="lt" />
            <param name="bgcolor" value="#ffffff"/>
            </object>

    import flash.media.Video;
    import flash.net.NetStream;
    import flash.net.NetConnection;
    import flash.events.NetStatusEvent;
    import flash.events.SecurityErrorEvent;
    import flash.events.AsyncErrorEvent;
    import flash.Lib;
    
    
    class Test {
    static function main() {
               var connected : Bool;
               var screen = new Video();
            var connection = new NetConnection();
            
            connection.addEventListener( 
                                    NetStatusEvent.NET_STATUS, 
                                    function( e: NetStatusEvent )
                                    {
                                        
                                        switch ( e.info.code ) 
                                        {
                                            
                                            case "NetConnection.Connect.Success":
                                                trace( '   connection made' );
                                            case "NetConnection.Connect.Failed":
                                                trace( 'CONNECTION FAIL: change your firewall settings or you are using the wrong key - 90 sec timeout' );
                                        }
                                        
                                    }
                                );
            trace(" Starting plugin ");
            trace(" v1.30 with flow");        
            trace(" now connecting ");
            connection.connect("rtmpe://mylink,"mp4:mydirectory/myvideo.mp4");
            
            trace(" ready ? ");
            // connection.connect(null);
            var stream = new NetStream(connection);
            trace(" Go !!! ");
            //
            screen = new Video(160,120);
            screen.attachNetStream(stream);
            trace(" Now playing test.flv ");
            flash.Lib.current.addChild( screen );
            // stream.play("test.flv");
            stream.play();
              trace(" End ... ");
          
           }
           
    }
  • correction, i don't arrive to read rtmpe stream, who could help me ???

< Prev | Page 1 / 1 | Next >