是否有 FLVPlayback onHttpError?
我能够判断图像路径是否未找到文件,因为我可以附加到加载器httpStatus。我找不到任何类似的 FLV(不使用流媒体)。
编辑 - 这就是我想要做的,尽管此代码不起作用:
flv.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
private function httpStatusHandler(event:HTTPStatusEvent):void {
if(event.status != 200){
console.error("VIDEO httpStatusHandler.Error: " + event.status, event);
}
}
flv.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
private function ioErrorHandler(event:IOErrorEvent):void {
console.error("VIDEO ioErrorHandler: " + event);
}
我发现了我的问题。我在做: flv.load(路径) flv.play()
通过在调用 play 之前不等待某种状态,我压制了 connectionError 状态。
I'm able to tell if an image path was file-not-found or not, because I can attach to the loaders httpStatus. I can't find anything similar for an FLV (not using streaming).
EDIT - this is what I'm trying to do, although this code doesn't work:
flv.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
private function httpStatusHandler(event:HTTPStatusEvent):void {
if(event.status != 200){
console.error("VIDEO httpStatusHandler.Error: " + event.status, event);
}
}
flv.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
private function ioErrorHandler(event:IOErrorEvent):void {
console.error("VIDEO ioErrorHandler: " + event);
}
I found my problem. I was doing:
flv.load(path)
flv.play()
By not waiting for some kind of status before calling play, I was squelching the connectionError status.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论