red5使用actionscript播放oflademo视频
你好我有以下问题, 我使用 red5 录制视频,如下所示:
nc = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
ns = new NetStream(nc);
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish( "file1", "record" );
视频存储在 C:\Program Files (x86)\Red5\webapps\oflaDemo\streams
当我尝试播放相同的视频时,我这样做:
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = nsClient;
video = new Video(myVid.width,myVid.height);
video.attachNetStream(ns);
video.smoothing=true;
myVid.addChild(video);
ns.play("http://localhost:5080/oflaDemo/file1.flv");
但它抛出错误#2044:未处理的 NetStatusEvent:。 level=error,code=NetStream.Play.StreamNotFound
有什么想法吗???
Hello i have the following problem,
I record a video using red5 like this:
nc = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
ns = new NetStream(nc);
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish( "file1", "record" );
and the video is stored in
C:\Program Files (x86)\Red5\webapps\oflaDemo\streams
while when i try to play the same video i do:
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = nsClient;
video = new Video(myVid.width,myVid.height);
video.attachNetStream(ns);
video.smoothing=true;
myVid.addChild(video);
ns.play("http://localhost:5080/oflaDemo/file1.flv");
but it throws Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound
any ideas???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请将 ns.play("http://localhost:5080/oflaDemo/file1.flv"); 更改为 ns.play("rtmp://localhost:5080/oflaDemo/file1 .flv"); 希望对您有用
Please change ns.play("http://localhost:5080/oflaDemo/file1.flv"); to ns.play("rtmp://localhost:5080/oflaDemo/file1.flv"); hope it useful with you
我解决了如何播放视频的问题:
I solved the problem on how to play the video with: