1

我正在尝试查看适用于 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");

它到达了代码的底部,但之后就卡住了。白屏、流不连接等

4

0 回答 0