Skip to main content
Participant
June 14, 2007
Question

Sample FMS Application

  • June 14, 2007
  • 1 reply
  • 265 views
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
    This topic has been closed for replies.

    1 reply

    June 14, 2007
    I see the problem... you have the streams directory in the wrong place. You flv should be here:


    FMS Server\applications\videostreaming\streams\myvideos\video1.flv

    Notice how \streams is a child of the application directory, and inside \streams, there is a directory with the name of your instance. Once you make that fix, all should be well... you code looks proper.