AS3 RTMP客户端无法正常工作

时间:2013-05-29 03:54:14

标签: actionscript-3 flash rtmp netstream netconnection

我正在尝试查看在JW播放器中有效的流,但不是在我的代码中。 代码:

netcon.connect("rtmp://...");
netcon.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netcon.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
netcon.addEventListener(IOErrorEvent.IO_ERROR,errorHandler);
netcon.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler);
...
if (code == "NetConnection.Connect.Success") {
stream = new NetStream(netcon);
stream.client = this;
attachNetStream(stream);
smoothing = true;
deblocking = 1;
stream.play("flv:banana");
stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandler);
stream.bufferTime = 2;

trace("stream is connecting");

它到达底部的代码块,但之后就会卡住。白色屏幕,流不连接等

0 个答案:

没有答案