Question
Need help on application to stream movie
I have used Flash Media Encoder and can stream to my account,
but I want to do the same thing with Flash Media Server instead. I
did not need scripts with FME as Justin provides a config file for
FME including paths and user names so it just works.
I have an app folder built and a main.asc, and the app fired up and says it is loaded, but it does not connect nor serve anything, I hacked a script together but am clueless.
All I want it to do is to connect up to Justin and server any movies in the folder, and if the connection were to drop, to keep trying to reconnect forever (although this part is not in my hacked script yet).
I'm sure my script is wrong, I have no experience with the language but read some and hacked the following together.
Please take a minute and glance at it, I have posted on numerous other sites and have not gotten even one bad response yet.
Thanks
In this example I am just trying to get one file, test.flv to stream, but I want any files in the folder to stream and when done repeat, and if the connection drops, to try to reconnect.
----------------------------
application.onAppStart = function() {
var myStream = Stream.get("test");
var nc = new NetConnection;
nc.connect("rtmp://live.justin.tv/app");
var ns = new NetStream(nc);
ns.attach(myStream);
ns.publish(myStream,"live_1230456_12ab3e4k");
}
----------------------------
the content in the ns.publish line after "live" is required (perhpas not as I have provided here) by Justin.TV, it is my username and password I guess although I have altered it for public posting here.
Thanks
I have an app folder built and a main.asc, and the app fired up and says it is loaded, but it does not connect nor serve anything, I hacked a script together but am clueless.
All I want it to do is to connect up to Justin and server any movies in the folder, and if the connection were to drop, to keep trying to reconnect forever (although this part is not in my hacked script yet).
I'm sure my script is wrong, I have no experience with the language but read some and hacked the following together.
Please take a minute and glance at it, I have posted on numerous other sites and have not gotten even one bad response yet.
Thanks
In this example I am just trying to get one file, test.flv to stream, but I want any files in the folder to stream and when done repeat, and if the connection drops, to try to reconnect.
----------------------------
application.onAppStart = function() {
var myStream = Stream.get("test");
var nc = new NetConnection;
nc.connect("rtmp://live.justin.tv/app");
var ns = new NetStream(nc);
ns.attach(myStream);
ns.publish(myStream,"live_1230456_12ab3e4k");
}
----------------------------
the content in the ns.publish line after "live" is required (perhpas not as I have provided here) by Justin.TV, it is my username and password I guess although I have altered it for public posting here.
Thanks
