Create a folder inside application folder(the folder name becomes application name) and create a file called main.asc inside it...And write the following content in main.asc file...And it will do basic record for you..Please find related sources in help manuals...Server side action script is pretty elementary and explained in detail in help docs..Thankyou Bye. var MAX_RECORDERS=20; var RecorderCount=0; application.onAppStart = function() { trace("Application name: " + application.name); trace("Server: " + application.server); application.s = new Array(); } application.onPublish = function(clientObj, streamObj) { ++RecorderCount; if(RecorderCount > MAX_RECORDERS) return; trace("recording started..."); var strName = "recorded_" + streamObj.name; var s = Stream.get(strName); if (s == undefined ) return; s.onStatus = function(info) { trace(info.code); } if (!s.record("record")) { s.trace("record failed."); } s.play(streamObj.name, -1, -1, true); application.s[streamObj.name] = s; } application.onUnpublish = function(clientObj, streamObj) { --RecorderCount; var s = application.s[streamObj.name]; if (s && s!= undefined) { s.record(false); s.play(false); s.flush(); Stream.destroy(s); application.s[streamObj.name] = null; } }
... View more