red5使用actionscript播放Lademo的视频

red5使用actionscript播放Lademo的视频,actionscript,record,red5,playback,Actionscript,Record,Red5,Playback,你好,我有以下问题, 我使用red5录制视频,如下所示: nc = new NetConnection(); nc.connect("rtmp://localhost/oflaDemo"); ns = new NetStream(nc); ns.attachCamera(cam); ns.attachAudio(mic); ns.publish( "file1", "record" ); 视频存储在 C:\ProgramFiles(x86)\Red5\webapps\oflaDemo\str

你好,我有以下问题, 我使用red5录制视频,如下所示:

nc = new NetConnection();
nc.connect("rtmp://localhost/oflaDemo");
ns = new NetStream(nc); 
ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish( "file1", "record" );
视频存储在 C:\ProgramFiles(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:。级别=错误,代码=NetStream.Play.StreamNotFound


有什么想法吗?

请更改ns.播放(“http://localhost:5080/oflaDemo/file1.flv");ns.播放(“rtmp://localhost:5080/oflaDemo/file1.flv");希望它对您有用

请更改ns。播放(“http://localhost:5080/oflaDemo/file1.flv");ns.播放(“rtmp://localhost:5080/oflaDemo/file1.flv");希望它对您有用

我解决了如何播放视频的问题:

<s:VideoPlayer id="myVid" visible="true" width="100%" height="100%" mediaPlayerStateChange="myVid_mediaPlayerStateChangeHandler(event)">
 <s:source>
   <s:DynamicStreamingVideoSource host="{mediaServerUrl}" streamType="recorded">
      <s:DynamicStreamingVideoItem streamName="{videoFolder}/{filename}"/>
   </s:DynamicStreamingVideoSource>
 </s:source>
</s:VideoPlayer>

我解决了如何播放视频的问题:

<s:VideoPlayer id="myVid" visible="true" width="100%" height="100%" mediaPlayerStateChange="myVid_mediaPlayerStateChangeHandler(event)">
 <s:source>
   <s:DynamicStreamingVideoSource host="{mediaServerUrl}" streamType="recorded">
      <s:DynamicStreamingVideoItem streamName="{videoFolder}/{filename}"/>
   </s:DynamicStreamingVideoSource>
 </s:source>
</s:VideoPlayer>


rtmp端口默认不是5080!应该是1935年,所以:ns.play(“rtmp://localhost:1935/oflaDemo/file1.flv"); 或者简单地说ns.play(“rtmp://localhost/oflaDemo/file1.flv");默认情况下,rtmp端口不是5080!应该是1935年,所以:ns.play(“rtmp://localhost:1935/oflaDemo/file1.flv"); 或者简单地说ns.play(“rtmp://localhost/oflaDemo/file1.flv");