supriyopaul
09-20-2007, 02:34 PM
I have developed an web cam feed it is working, when i embed it in a html page it is also working, but the file when the html is opened from other machines the web cam feed is not available, the net connection is connecting but a blank white background is visible in place of the video.
Here is the code:-
var interval:Number;
var myCam:Camera = Camera.get();
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://fms-stream.flukii.com/Live_Cam");
myCam.setMode(320,240,30);
myCam.setQuality(0,80);
myCam.setKeyFrameInterval(5);
/*trace(myCam.bandwidth) //Clients Requirement
trace(myCam.fps)
trace(myCam.quality)*/
//
nc.onStatus = function(info:Object) {
if (String(info.code) == "NetConnection.Connect.Success") {
connectStatus_mc.gotoAndStop(2);
//
cam_vid.attachVideo(myCam);
ns.attachVideo(myCam);
ns.attachAudio(Microphone.get());
if (String(_root.save1).toLowerCase() == "yes") {
ns.publish("live_","record");
} else {
ns.publish("live_","record");
}
//
if (String(_root.camType).toLowerCase() == "livecam") {
interval = setInterval(checkEventTime, 1000);
}
} else {
connectStatus_mc.gotoAndStop(3);
trace(myCam.activityLevel);
}
for (var i in info) {
trace("Broadcaster: "+i+" == "+String(info[i]));
trace_txt.text += "\n"+i+" == "+String(info[i]);
}
};
any advise will be appreciated ....
Here is the code:-
var interval:Number;
var myCam:Camera = Camera.get();
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://fms-stream.flukii.com/Live_Cam");
myCam.setMode(320,240,30);
myCam.setQuality(0,80);
myCam.setKeyFrameInterval(5);
/*trace(myCam.bandwidth) //Clients Requirement
trace(myCam.fps)
trace(myCam.quality)*/
//
nc.onStatus = function(info:Object) {
if (String(info.code) == "NetConnection.Connect.Success") {
connectStatus_mc.gotoAndStop(2);
//
cam_vid.attachVideo(myCam);
ns.attachVideo(myCam);
ns.attachAudio(Microphone.get());
if (String(_root.save1).toLowerCase() == "yes") {
ns.publish("live_","record");
} else {
ns.publish("live_","record");
}
//
if (String(_root.camType).toLowerCase() == "livecam") {
interval = setInterval(checkEventTime, 1000);
}
} else {
connectStatus_mc.gotoAndStop(3);
trace(myCam.activityLevel);
}
for (var i in info) {
trace("Broadcaster: "+i+" == "+String(info[i]));
trace_txt.text += "\n"+i+" == "+String(info[i]);
}
};
any advise will be appreciated ....