1 Reply Latest reply on Aug 17, 2010 1:25 AM by daiyokocc

    Problem to play a live stream from FMS into spark videoDisplay control :(

    starmark02 Level 1

      Hey there,

       

           I hope you can help me with this.

       

           I have  a live Stream in my flash media server in status publishing, when I play it in the client side,  its status changes to playing, until here, everything is good, but when i want to play the stream into VideoDisplay, it returns the playbackError status and I dont know why, Im using as source of videoDisplay a dynamicStreamVideoSource, but I dont know what Im doing bad, I have this;

       

      var dynamicStremSource:DynamicStreamingVideoSource = new DynamicStreamingVideoSource();
           dynamicStremSource.host = netConnecttion.uri;
           dynamicStremSource.streamType = "live";
                                 
           var streams:Vector.<DynamicStreamingVideoItem> = new Vector.<DynamicStreamingVideoItem>();
                             
           var it:DynamicStreamingVideoItem = new DynamicStreamingVideoItem();
                 it.streamName = "streamName";
                 it.bitrate = 100;
                                 
                streams.push(it);
                                 
                dynamicStremSource.streamItems = streams;
                videoDisplayObject.source = dynamicStremSource;

                videoDisplayObject.play();

       

      And the spark videoDisplay control;

       

      <s:VideoDisplay mediaPlayerStateChange="stateChange(event)" width="110" height="110" id="videoDisplayObject" autoPlay="false">                   
      </s:VideoDisplay>

       

      What do you thins it's going on? Help me

        • 1. Re: Problem to play a live stream from FMS into spark videoDisplay control :(
          daiyokocc

          Variable e.g.


          var dynamicStremSource:DynamicStreamingVideoSource

          var streams:Vector.<DynamicStreamingVideoItem>

          var it:DynamicStreamingVideoItem

           

          should be defined outside your current function.

           

          e.g.

           

          private var dynamicStremSource:DynamicStreamingVideoSource;

          privatevar streams:Vector.<DynamicStreamingVideoItem>;

          privatevar it:DynamicStreamingVideoItem;

           

          protected function StartMyLive():void

          {

               dynamicStremSource= new DynamicStreamingVideoSource();
               dynamicStremSource.host = netConnecttion.uri;
               dynamicStremSource.streamType = "live";
                                     
               streams = new Vector.<DynamicStreamingVideoItem>();
                                 
               it = new DynamicStreamingVideoItem();

           

               it.streamName = "streamName";
               it.bitrate = 100;
                                     
               streams.push(it);
                                     
               dynamicStremSource.streamItems = streams;
               videoDisplayObject.source = dynamicStremSource;

               videoDisplayObject.play();

           

          }