是否有 FLVPlayback onHttpError?

发布于 2024-08-31 05:20:26 字数 674 浏览 1 评论 0原文

我能够判断图像路径是否未找到文件,因为我可以附加到加载器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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文