Skip to main content
January 30, 2007
Question

Stream FLV file off FMS?

  • January 30, 2007
  • 4 replies
  • 341 views
I've streamed FLV files off FMS before, but always using components. I'm trying a simple setup with a Video instance, with no luck:

I put my FLV file on FMS in /myApp/streams/_definst_/myVideo.flv

I have a Video object on stage with an instance name of 'vid'

My AS is:
var vid:Video;
var nc:NetConnection = new NetConnection();
var ns:NetStream = new NetStream(nc);
nc.onStatus = function(info){
trace(info.code);
vid.attachVideo(ns);
ns.play('myVideo');
}
nc.connect('rtmp://rtmphost/myApp');

When I publish, I get "NetConnection.Connect.Success" but no video or audio. What is not correct about this set up?
    This topic has been closed for replies.

    4 replies

    January 30, 2007
    Thanks, got it working now. Now I'm facing a strange behavior... while the FLV loads and streams, it seems that if I setBufferTime(5) it plays in fast motion for the first split second. Does that makes any sense? Is this a known behavior I need to work around? If I leave the bufferTime at default, which is apparently 1 tenth of a second, it has no fast forward behavior, but I get a lot of interupted skipping in the beginning.
    Known Participant
    January 30, 2007
    Sorry to jump in here off topice but i am also new to FCS/FMS and just doing some search and i see jayCharles popup alot :)

    Love your sig m8

    I know the feeling...
    I have had to apply the same sig on one of my moderated flash dev forums.

    I am sure you will come across a couple of my post's over the comming months.
    I hope your as helpful :)
    Participating Frequently
    January 30, 2007
    I would declare ns outside of onStatus and instantiate inside.

    var ns:NetStream;

    nc.onStatus(info)
    {
    if (this.isConnected){
    ns = new Netstream(nc);
    January 30, 2007
    It's probably because you're creating you netstream before you've connected your netconnection. Try creating the netstream after your netConnection.onStatus handler gets a netconnection.connect.success message.