Skip to main content
Participant
January 26, 2009
Question

FMS streams questions

  • January 26, 2009
  • 1 reply
  • 315 views
i have two (2) application running under FMS namely video recorder, video player and a simple flash apps. video player has the feature to broadcast live feed and prerecording clips. when video player is scheduled to play a live feed to will connect to the stream of the video recorder and when it is scheduled to play a prerecording clips the video player will play the video clips. My problem is how can I connect the simple flash apps to broadcast the feed that the video recorder is currently playing?
    This topic has been closed for replies.

    1 reply

    January 26, 2009
    I would handle this by making a server side NetConnection between the recorder app and the player app, and then have the player app consume the stream from the recorder app.

    Making a NetConnection and playing a stream on the server side is very much like making a client to server netconnection.

    // On the player app

    var myNC = new NetConnection();
    var myNS = new NetStream(myNC);
    myNC.onStatus = function(info){
    if(info.code.indexOf("Success") > -1){
    myNS.play("nameOfStreamOnTheRecordApp", -1, -1);
    }
    }
    myNC.connect("rtmp://host.com/recorderApp/instance");

    Assuming you connection doesn't fail, you will now have the stream playing on your player app, and your clients can subscribe to it (or you can play it over another stream your clients are subscribed to).