Question
Sample FMS Application
Hi,
I was trying to create my first application on FMS. The problem is that the client does not show anything
I created the following folder & copied my flv file into it
FMS Server\applications\videostreaming\myvideos\streams\video1.flv
Then I created a client (Script File)
//create a netConnection object
var nc = new NetConnection();
//keep an eye on the status events, we need to know when we have connected up
nc.onStatus = function(info) {
trace(info.code);
if (info.code == "NetConnection.Connect.Success") {
createStreamObject();
}
};
//this function is called once we have connected up to the server
function createStreamObject() {
//this is the netStream object that plays the video file
ns = new NetStream(nc);
ns.onStatus = function(obj:Object) {
trace(obj.code+":"+nc.uri);
};
//attach the video stream to the video object on the stage
vidObject.attachVideo(ns);
//play the video file that we put in the directory for the application
ns.play("video1");
}
//connect up
nc.connect("rtmp://192.168.1.126/videostreaming/myvideos");
//nc.connect(null);
Then I created the Video Component & named it vidObject.
The problem is that when i See onthe admin console of FMS, I can see that the client has been conneted to the server. I can also see the stream, but it does not display on the client. What could be the problem. Please Help
I was trying to create my first application on FMS. The problem is that the client does not show anything
I created the following folder & copied my flv file into it
FMS Server\applications\videostreaming\myvideos\streams\video1.flv
Then I created a client (Script File)
//create a netConnection object
var nc = new NetConnection();
//keep an eye on the status events, we need to know when we have connected up
nc.onStatus = function(info) {
trace(info.code);
if (info.code == "NetConnection.Connect.Success") {
createStreamObject();
}
};
//this function is called once we have connected up to the server
function createStreamObject() {
//this is the netStream object that plays the video file
ns = new NetStream(nc);
ns.onStatus = function(obj:Object) {
trace(obj.code+":"+nc.uri);
};
//attach the video stream to the video object on the stage
vidObject.attachVideo(ns);
//play the video file that we put in the directory for the application
ns.play("video1");
}
//connect up
nc.connect("rtmp://192.168.1.126/videostreaming/myvideos");
//nc.connect(null);
Then I created the Video Component & named it vidObject.
The problem is that when i See onthe admin console of FMS, I can see that the client has been conneted to the server. I can also see the stream, but it does not display on the client. What could be the problem. Please Help