Skip to main content
Participant
May 6, 2013
Question

Easy Webcam Record App

  • May 6, 2013
  • 1 reply
  • 498 views

I am looking for a very very basic way to just take the webcam. Have a little button to click record, and then when done press stop. Then that video is saved as a .flv on my server (and then i can do other things with it not in media server). I am sure this is very easy to do but i can't find any tutorials and suggestions on where to start with this. Any help would be appreciated.

thanks!

This topic has been closed for replies.

1 reply

May 6, 2013

Hi,

You may want to take a look at this. This provides the client side code required to publish a video from the webcam. On the server side you'll need to create a new application with a simple server-side code in the main.asc like:

var pubCount = 0;

application.onConnect=function(clientObj){

          trace("          on connect ");

          return true;

};

 

application.onDisconnect=function(clientObj){

          trace("          on disconnect ");

};

application.onPublish = function(clientObj,streamObj){

  trace("          in application publish : " + streamObj.name);

  if(pubCount <= 1)

          streamObj.record("record");

  else

          streamObj.record("append");

  pubCount++; 

}

application.onUnpublish = function(clientObj,streamObj){

trace("          on unpublish : " + streamObj.type + ":" + streamObj.name);

streamObj.record(false);

}

Hope this helps.

Let me know if you have any other questions.

Thanks,

Apurva