API Docs for:
Show:

File: index.js

  1. /**
  2. * Main classes and use
  3. *
  4. * @module NodeWebcam
  5. *
  6. */
  7. "use strict";
  8.  
  9.  
  10. /**
  11. * @class API
  12. *
  13. */
  14.  
  15. var NodeWebcam = {
  16.  
  17. version: "0.3.3",
  18.  
  19. REVISION: 3,
  20.  
  21. Factory: require( __dirname + "/src/Factory.js" ),
  22.  
  23. Webcam: require( __dirname + "/src/Factory.js" ),
  24.  
  25. FSWebcam: require( __dirname + "/src/webcams/FSWebcam.js" ),
  26.  
  27. ImageSnapWebcam: require( __dirname + "/src/webcams/ImageSnapWebcam.js" ),
  28.  
  29. WindowsWebcam: require( __dirname + "/src/webcams/WindowsWebcam.js" )
  30.  
  31. };
  32.  
  33.  
  34. //API
  35.  
  36.  
  37.  
  38. /**
  39. * Main create
  40. *
  41. * @method create
  42. *
  43. * @param {Object} options
  44. *
  45. */
  46.  
  47. NodeWebcam.create = function( options ) {
  48.  
  49. return NodeWebcam.Factory.create( options );
  50.  
  51. };
  52.  
  53.  
  54. /**
  55. * Quick capture helper
  56. *
  57. * @method capture
  58. *
  59. * @param {String} location
  60. * @param {Object} options
  61. * @param {Function} callback
  62. *
  63. */
  64.  
  65. NodeWebcam.capture = function( location, options, callback ) {
  66.  
  67. var webcam = NodeWebcam.create( options );
  68.  
  69. webcam.capture( location, callback );
  70.  
  71. return webcam;
  72.  
  73. };
  74.  
  75.  
  76. //Export
  77.  
  78. module.exports = NodeWebcam;
  79.