1 Reply Latest reply on Sep 23, 2010 12:14 PM by estabahn

    How to play a live video stream with FMS?

    estabahn

      I'm trying to get Flex Builder 3 to play a live video stream with Flash Media
      Server and Flash Live Media Encoder. I'm able to stream pre-recrorded flvs in
      flex from flash media server. I'm able to stream live video in flash, but not
      with flex.What am I doing wrong?

       

      This code streams pre-recorded Video on Demand flvs:

       

      <?xml version="1.0"?>
      <!-- controls\videodisplay\VideoDisplayFMS.mxml -->
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

       

          <mx:HBox>
              <mx:Label text="RTMP FMS 2.0"/>
              <mx:VideoDisplay
                  autoBandWidthDetection="false"
                  source="rtmp://localhost/vod/Legend.flv"/>
          </mx:HBox>
      </mx:Application>

       

      But if I point the url at  rtmp://localhost/live/livestream.flv I get nothing. Any
      ideas?

       

      Thanks!

        • 1. Re: How to play a live video stream with FMS?
          estabahn Level 1

          Problem solved  - thanks to JayCharles. I forgot to set the live attribute. Here's the working code:

           


          <?xml version="1.0"?>
          <!-- controls\videodisplay\VideoDisplayFMS.mxml -->
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

           

              <mx:HBox>
                   <mx:VideoDisplay
                       live="true"
                       autoBandWidthDetection="false"
                       source="rtmp://localhost/live/livestream"/>
               </mx:HBox>
          </mx:Application>