我的AS3项目中有以下代码:
nc.addEventListener(NetStatusEvent.NET_STATUS, netConnectionStatus);
netRemoteStream.addEventListener(NetStatusEvent.NET_STATUS, netRemoteStatus);
netRemoteStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
private function netConnectionStatus(event:NetStatusEvent):void
{
trace("netStatus = " + event.info.code);
}
private function netRemoteStatus(e:NetStatusEvent):void
{
trace("netRemoteStatus = " + e.info.code);
}
private function asyncErrorHandler(e:AsyncErrorEvent):void
{
trace("asyncErrorHandler " + e.error);
}
我订阅了NetStream:
netRemoteStream = new NetStream(myNetConnection);
netRemoteStream.play("channelToView");
netRemoteStream.bufferTime = 0;
myViewer.attachNetStream(netRemoteStream);
netRemoteStream.receiveAudio(true);
netRemoteStream.receiveVideo(true);
但有时视频会被冻结,我只接收音频,但不接收视频,而听众则不会显示任何错误。我该怎么做才能解决这个问题?我必须调用“netRemoteStream.play(”channelToView“);”当视频被冻结,但我不知道什么时候。
有关详细信息,我使用过Wireshark嗅探器,我可以观察到以下痕迹: 音频数据 视频数据 设置块大小513 音频数据
有什么想法吗?有人可以帮帮我吗? 谢谢