1

Flash Builder 4.6 モバイル プロジェクトを使用して Android デバイスからライブ ビデオをストリーミングしたいのですが、実現できませんでした..help plz..

これが私のコードです:

  <?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"
         creationComplete="windowedapplication1_creationCompleteHandler(event)"
             xmlns:mx="library://ns.adobe.com/flex/mx" width="480" height="800">
  <fx:Script>
    <![CDATA[
        import flash.filters.ColorMatrixFilter;
        import mx.events.FlexEvent;
        private var myCam:CameraUI;
        private var cam:Camera;
        private var nc:NetConnection;
        private var ns:NetStream;
        private var video:Video;
        private var meta:Object;
        private var nsClient:Object =new Object();
        protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
        {
            connect();
        }
        private function connect():void
        {
            if(nc==null)
            {
                        nc = new NetConnection();
                nc.connect("rtmp://localhost/live");
                    // get status information from the NetConnection object
                nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
                        }
        }
        private function netStatus(event:NetStatusEvent):void {
            var infoObject:Object=event.info;
            trace("nc: "+infoObject.code+" ("+infoObject.description+")");
            if (infoObject.code == "NetConnection.Connect.Success")
            {
                ns = new NetStream(nc);
                ns.publish("sample");
                ns.client = nsClient;
                video = new Video();
                video.smoothing = true;
                video.attachNetStream(ns);
                                    uic.addChild(video);
                }
        }
    ]]>
</fx:Script>
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:UIComponent id="uic" />
    </s:Application>

ビデオをストリーミングできませんでした。デバイス自体でビデオを見ることさえできません。これを実行すると、空白のページしか開かれません。

そして、私は置き換えたエラーを見つけようとしました

   ns.publish("sample") with ns.play("http://flv.dudeel.com/flv/p2DAM3FX7tBrk.flv")

今、私は行でエラーを受け取りました

  ns=new NetStream(nc);

  Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound

この場合、解決策とストリーミングビデオで達成する方法は何ですか?

ありがとう、

4

1 に答える 1