Skip to main content
Inspiring
January 18, 2007
Answered

Can not connect to a live stream

  • January 18, 2007
  • 1 reply
  • 231 views
I just can not get the live stream. I have two files, one sender and 1 subscriber. I'm working localy testing FMS.

I just have a video object on each stage and the actionscript:

sender:
var rtmpPath:String = new String();
rtmpPath = "rtmp:/test";

var ncBase:NetConnection = new NetConnection();
ncBase.connect(rtmpPath);

var ns:NetStream = new NetStream(ncBase);
local_sender.attachVideo(Camera.get());
ns.publish("testVideo","live");

the video object instance name is local_sender.



the subscriber:
var rtmpPath:String = new String();
rtmpPath = "rtmp:/test";

var ncBase:NetConnection = new NetConnection();
ncBase.connect(rtmpPath);

var ns:NetStream = new NetStream(ncBase);
local_re.attachVideo(ns);
ns.play("testVideo");



I can see video from camera in the sender file but in the subscriber nothing.
In the flash media server console i can see 3 streams. one with the name i create and the other two generic, like CBAoQD6H...

how can test is the stream out is really going out and if so, if the stream in the problem?
I dont have a main.as file in my folder application. but i tried putting there one from the flash 8 samples and tutorials and didn't work.

any help will be very appreciated.

Thanks
    This topic has been closed for replies.
    Correct answer oscar7878
    now it's working. i forgot to attach the video to the netStream (sender file):

    ns.attachVideo(Camera.get());



    1 reply

    oscar7878AuthorCorrect answer
    Inspiring
    January 18, 2007
    now it's working. i forgot to attach the video to the netStream (sender file):

    ns.attachVideo(Camera.get());