0
我有問題讓我的flex代碼工作,下面是我的代碼,我嘗試netstream網絡攝像頭並接收它並使用2個功能。任何flex大師都可以幫我修復這些功能?newbie:flex netstream如何讓我的代碼流和正確接收netstreams?
function onNetConnectionPublish():void {
StatusMessage("onNetConnectionPublish called");
ncNetStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);
ncNetStream.addEventListener(NetStatusEvent.NET_STATUS, sendNetStreamHandler);
ncNetStream.publish("media");
ncNetStream.attachAudio(Microphone.getMicrophone());
ncNetStream.attachCamera(Camera.getCamera());
}
和:
function connectToRemote(remoteId:String) {
StatusMessage("connectToRemote(" + remoteId + ")");
ncNetStream = new NetStream(nc, remoteId);
ncNetStream.addEventListener(NetStatusEvent.NET_STATUS, receiveNetStreamHandler);
ncNetStream.play("media");
}
顯示視頻:
THX讓我在正確的方向 – Ilse 2012-03-27 07:49:18
@sub_stantial:引用源。接收器是[由Peter deHaan撰寫](http://blog.flexexamples.com/2008/03/01/displaying-a-video-in-flex-using-the-netconnection-netstream-and-video-classes/ )。 – approxiblue 2012-06-07 14:19:10
對不起,我的錯。 – Subodh 2012-06-18 08:58:12