Skip to main content
Participant
January 5, 2007
Question

live streaming

  • January 5, 2007
  • 1 reply
  • 332 views
Hello everybody......

I am startin now with flash and fms2 so please ...be patient against my ignorance.

I finally have been able to build a code for publishing and playing a live stream from my webcam.

The two modules work fine if run separately one after the other....publisher ----> player.

What I am trying to obtain is this:
I want that a web client , via IE6, connects to my site and see live what's happening.

Right now I am publishing the player ONLY module with IIS.

If I connect from my laptop within my home network, to the player module (with the publisher running), it works fine.
Of course the publisher has to be started manually by me before connecting from the laptop.

What I want to avoid it right this.... so I would like to have the client to start the live streaming automatically when it get connected to my website, and stops the live streaming when he leaves the website.

Hope to be clear...

So, I putted togheter the 2 modules into ONE ONLY (the below one), and published it via IIS.

This code works fine on the PC where FLASH 8 and FMS2 are installed (Ctrl + Enter), but connecting to the website from the laptop it does not work.

Could you guys give me a hint to get out of this problem ?

I am stuck badly..... :-(

I am sorry for my bad english but I am italian....

Sincerely Riccardo


* START PUBLISHER */
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://192.168.0.10/videotest");
var ns:NetStream = new NetStream(nc);

ns.attachVideo(Camera.get(1));
ns.attachAudio(Microphone.get(0));
ns.publish("tinaCam1","live");
/* END PUBLISHER */


/* START PLAYER */
var na:NetConnection = new NetConnection();
na.connect("rtmp://192.168.0.10/videotest");

var nt:NetStream = new NetStream(na);
vid.attachVideo(nt);
nt.play("tinaCam1");
/* END PLAYER */

    This topic has been closed for replies.

    1 reply

    Participant
    January 6, 2007
    hi!

    i have the same problem. i use this script from a tutorial.
    if you find the solution please tell me.

    Thank you!

    client_cam=Camera.get();
    client_mic=Microphone.get();
    Live_video.attachVideo(client_cam);

    function initStreams() {

    // Make a connection to the application on the server
    client_nc = new NetConnection();

    // Handle status message
    client_nc.onStatus = function(info) {
    trace("Level: " + info.level + newline + "Code: " + info.code);
    }

    client_nc.connect("rtmp://www.3dmedia.xhost.ro/tutorial_record");

    // Create output stream
    out_ns = new NetStream(client_nc);



    }

    // Connect to server and set up streams
    initStreams();