Search code examples
apache-flexactionscriptred5

Access videos stored in red5 using actionscript


i currently use the above code:

    nc = new NetConnection();
    nc.connect(null);           
    ns = new NetStream(nc);
    ns.play("http://localhost:5080/oflaDemo/myvideo.flv");
    ns.client = nsClient;
    video = new Video();
    video.attachNetStream(ns);
    uic.addChild(video);

but i cant get the myvideo which i recorded using red5.how can i achieve that? myvideo is stored in red5 folder under webapps/oflaDemo/streams/myvideo how to access that in order to play it?

thanks in advance!


Solution

  • it have to be something like this:

    nc = new NetConnection();
    nc.connect("rtmp://localhost:5080/oflaDemo");           
    ns = new NetStream(nc);
    ns.play("myvideo.flv");
    ns.client = nsClient;
    video = new Video();
    video.attachNetStream(ns);
    uic.addChild(video);