flash 是否会生成“NetStream.Play.StreamNotFound”?尝试播放无效的直播流时出错?
我使用 NetStream.play("invalid-live-stream-url") 播放无效的直播流。 其他参数使用默认值,例如start = -2,len = -1。
菜单上说,当我们使用默认的“start”和“len”调用“NetStream.play”时,“播放直播流直到不再可用。如果找不到指定名称的直播流,Flash Player播放录制的流直到结束。”
但是,我在服务器上没有与实时流同名的录制流,并且我没有收到预期的“NetStream.Play.StreamNotFound”错误。
I used NetStream.play("invalid-live-stream-url") to play an invalid live stream.
The other arguments are using default, e.g. start = -2, len = -1.
The menu says that when we use the default "start" and "len" to call "NetStream.play", "Plays the live stream until it is no longer available. If a live stream of the specified name is not found, Flash Player plays a recorded stream until it ends."
However, I do not have a recorded stream on the server that has the same name as the live stream, and I did not get the expected "NetStream.Play.StreamNotFound" error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直播流只是标识符,因此您不会收到 StreamNotFound 错误。一旦您开始从流中播放,它就“存在”,只是其中没有视频。此时,Flash 将等待 FMS 发送视频。
当您传递 0 作为开始以强制仅记录流并且文件不存在时,会发生 NetStream.Play.StreamNotFound。
Live streams are just identifiers, so you won't get a StreamNotFound error for them. As soon as you start playing from the stream it 'exists', there's just no video in it. At that point, Flash will wait for FMS to send video.
NetStream.Play.StreamNotFound happens when you pass 0 as the start to force recorded streams only, and the file doesn't exist.