1

我的 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 嗅探器,并且可以观察到以下痕迹: Audio Data Video data Set Chunk Size 513 Audio Data

任何想法?有人可以帮助我吗?谢谢

4

0 回答 0