Why Stream.play() method do not work?
I want to create an application to switch streams and republish them as single continious stream to the remote server.
In first step I tested "livestreams code" from the "Example of Multipoint publishing" on p. 184 of the "ADOBE®FLASHMEDIA SERVER 4.5® Developer’s Guide" where ns.publish method is used. It was successful.
I try stream.play method now.
I had written main.asc code like in the 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 try to broadcast to my local server (to URI - "localhost/studia") by two clients - by FMLE and by my "livestreams" application consequently (with stream name "livestream2") and retraslate it to remote server using my application "studia" on local one.
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.
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");
application.myStream = Stream.get("livestream");
if (application.myStream){
application.myStream.play("livestream2", 0, -1, true, application.myRemoteConn);
}
Why Stream.play() method do not work?
What I do wrong?
