Creating new application problem
I try to create a new application to switch streams. I call it "studia".
I place the server-side code in a file named main.asc and create new folder "studia" in the rootinstall/applications folder.
I copy main.asc file to this folder and start Adobe Flash Media Live Encoder 3 and try to broadcast to this URI (localhost/studia) with stream name "livestream1".
My application do not start, in fms consol do not appear application name and Live Encoder say me "Falure to connect to primary server".
I add the string "studia_DIR = C:\Program Files (x86)\Adobe\Flash Media Server 4.5\applications\studia" to the fms.ini file script and restart my computer.
I repeat my attempt - the same answers and no effect from application "studia".
I create folder "mixer" in the rootinstall/applications/studia folder, create folder "script" in this folder, replase main.asc file to it and start Adobe Flash Media Live Encoder 3 and "livestreams" application to broadcast to URI localhost/studia/mixer (or even to localhost/studia) by two streams with stream names "livestream1" and "livestreams2" - broadcasts are suссesful, the application name "studia/mixer" (or even studia/_definst_) appear in the fms console with client=2.
But application "studia" do not work.
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 good)
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);
}
I have few questions:
1. Why application "studia" do not start when I create folder "studia" in the rootinstall/applications folder, place main.asc in it and broadcast "livestream1" to this folder by Flash Media Live Encoder?
2. Why application "studia" begin to work only when I create folder "mixer" in the rootinstall/applications/studia folder and place main.asc file to rootinstall/applications/studia/script folder?
3. Why FMS do not execute main.asc script?
What i do wrong?
