3 Replies Latest reply on Feb 4, 2011 5:35 AM by daslicht

    Pseudostreaming with Lighttpd and Flex ?

    daslicht Level 2

      Hello,

      anyone know a example Player (not compiled , as source) built in Flex for streaming FLV files which are hosted on a FLV Streaming enabled Lighttpd server ?

      I know there is flowplayer or JWPlayer but they are to complext to get started with.

      A rather simple example would be better which show how to start playback at a certain time ( something like : player.play( position ); )

       

      Cheers

      Marc

        • 1. Re: Pseudostreaming with Lighttpd and Flex ?
          daslicht Level 2
          <?xml version="1.0" encoding="utf-8"?>
          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                            xmlns:s="library://ns.adobe.com/flex/spark" 
                            xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                             creationComplete="SuperSimpleFLVPlayer()"
                            >
          
               
               
               <fx:Script>
                    <![CDATA[
                         import flash.display.Sprite;
                         import flash.media.Video;
                         import flash.net.NetConnection;
                         import flash.net.NetStream;
                         
                         import mx.events.FlexEvent;
                         private var nc:NetConnection;
                         private var ns:NetStream;
                         //private var vid:Video;
                         private var client:Object;
               
                         public function SuperSimpleFLVPlayer ():void 
                         {
                              // Initialize net stream
                              nc = new NetConnection();
                              nc.connect (null); // Not using a media server.
                              ns = new NetStream(nc);
                              
                              client = new Object();
                              ns.client = client;
                              client.onMetaData = onMetaData_handler;
                              client.onCuePoint = onCuePoint_handler
                              
                              // Play video
                              
                              ns.play ( 'September Drive by Lightrocker_1.flv' );
                              //ns.seek( 555.664 );
                         
                         }
                         //MetaData
                         private function onMetaData_handler ( mdata:Object ):void {
                              trace (mdata.duration);
                         }
                         
                         private function onCuePoint_handler( item:Object ):void {
                              trace("cuePoint");
                              trace(item.name + "\t" + item.time);
                         }
          
                              
                         
          
                         
          
                    ]]>
               </fx:Script>
          </s:Application>
          
          • 2. Re: Pseudostreaming with Lighttpd and Flex ?
            daslicht Level 2

            noone ever tried this ???

            • 3. Re: Pseudostreaming with Lighttpd and Flex ?
              daslicht Level 2

              Flex + OSMF + Apache Origin is doing the job perfect !