通过flex创建视频

时间:2012-11-29 06:55:53

标签: flex flex4 red5 flash-media-server wowza

我在录制后有网络摄像头录像保存到我的服务器。我的问题是,当我录制网络摄像头视频时,我想附加一个介绍文本。 ic显示前10secs的文本。

这里是我的示例代码

 protected function button3_clickHandler(event:MouseEvent):void
            {
                nc = new NetConnection();
                nc.objectEncoding = flash.net.ObjectEncoding.AMF3;
                nc.connect("rtmp://localhost/webcamrecording/");
                                                                                                          nc.addEventListener(NetStatusEvent.NET_STATUS,staushandler);
                //Alert.show(nc.toString());


            }


protected function staushandler(obj:NetStatusEvent):void
            {
                var str:String=obj.info.code;
                Alert.show(str);

                camera = Camera.getCamera();
                microphone = Microphone.getMicrophone();
                vDisplay.attachCamera(camera);
                nsPublish = new NetStream(nc);
                nsPublish.publish("streamer", "record");
                nsPublish.attachCamera(camera);
                nsPublish.attachAudio(microphone);
            }

<s:Panel title="Video">
<mx:VideoDisplay id="vDisplay" creationComplete="VideoDisplay_creationCompleteHandler(event)" height="300" width="400"/>
</s:Panel>
<s:Button label="Record" click="button3_clickHandler(event)" />

提前致谢

0 个答案:

没有答案