Skip to main content
Known Participant
November 15, 2011
Question

live streams republishing problem

  • November 15, 2011
  • 1 reply
  • 1070 views

I try to create an application to switch streams and republish them as single continious stream to the remote server.

I call my application "studia".

I had written main.asc code almost like Stream.play() example on p. 162 of the "Server-Side ACTIONSCRIPT® Language Reference for ADOBE® FLASH® MEDIASERVER 4.5", but I have some problem  in spite of this.

I broadcast to my local server (to URI - "localhost/studia") by two clients - by FMLE (with stream name "livestream1") and  by my "livestreams" application (with stream name "livestream2").

The connection between two servers (with application "live") appears in the remote server Admin Consol,  but the stream from my local server do not come to it.

Admin console of my local server type me next live log:

NetConnection.Connect.Success

Sending error message: Method not found (onBWDone).

client  4702111234558869871 connected

client  4702111234575647087 connected

Sending error message: Method not found (releaseStream).

Sending error message: Method not found (FCPublish).

Here is my main.asc script:

application.myRemoteConn = new NetConnection();

application.myRemoteConn.onStatus = function(info){

    trace("Connect " + info.code + "\n");

    // Reply to all clients

    for (var i = 0; i < application.clients.length; i++){

        application.clients.call("onServerStatus", null, info.code, info.description);

    }

};

// Use NetConnection object to remote server connect (the remote server works with other application wery well)

application.myRemoteConn.connect("rtmp://RemoteServer/live");

// Server stream estimation

application.myStream = Stream.get("livestream");

if (application.myStream){

    // Switching sequence of liveStreams

    application.myStream.play("liveStream1", -1, 15);

    application.myStream.play("liveStream2", -1, 5, false);

    application.myStream.play("liveStream1", -1, 5, false);

    application.myStream.play("liveStream2", -1, 5, false);

    application.myStream.play("liveStream1", -1, 5, false);

    application.myStream.play("liveStream2", -1, 5, false);

    application.myStream.play("liveStream1", -1, 5, false);

}

What I do wrong?

Why I must to define onBWDone,  releaseStream and FCPublish methods and where?

This topic has been closed for replies.

1 reply

Nikhil_Kalyan
Participating Frequently
November 17, 2011

Hi,

The methods that are mentioned as missing as expected by FMLE as it makes calls to them. They are defined in the sample live application that comes with the installation. The code for these can be picked up from the samples folder under the FMS installation from the application live. You can add these in all of your server side scripts to make them more relevant.

Thank you !