API Docs for:
Show:

Webcam Class

Defined in: src/Webcam.js:1
Module: NodeWebcam

Webcam base class

Constructor

Webcam

(
  • options
)

Defined in src/Webcam.js:1

Parameters:

  • options Object

    composition options used to set

Methods

capture

(
  • location
  • callback
)

Defined in src/Webcam.js:133

Capture shot

Parameters:

  • location String
  • callback Function

clear

()

Defined in src/Webcam.js:83

Clear shot and camera memory data

clone

()

Defined in src/Webcam.js:67

Basic camera instance clone

Returns:

Webcam

generateSh

() String

Defined in src/Webcam.js:199

Generate cli command string

Returns:

String:

getBase64

(
  • shot
  • callback
)
Boolean | String

Defined in src/Webcam.js:265

Get shot base64 as image if passed Number will return a base 64 in the callback

Parameters:

  • shot Number | FS.readFile

    To be converted

  • callback Function

    Returns base64 string

Returns:

Boolean | String:

getLastShot

(
  • callback
)
Boolean

Defined in src/Webcam.js:245

Get last shot taken image data

Parameters:

  • callback Function

    Returns last shot from getShot return

Returns:

Boolean:

Successful getShot

getShot

(
  • shot
  • callback
)
Boolean

Defined in src/Webcam.js:211

Get shot buffer from location 0 indexed

Parameters:

  • shot Number

    Index of shots called

  • callback Function

    Returns a call from FS.readFile data

Returns:

Boolean:

hasCamera

(
  • callback
)

Defined in src/Webcam.js:111

Has camera

Parameters:

  • callback Function

    returns a Boolean

list

(
  • callback
)

Defined in src/Webcam.js:99

List available cameras

Parameters:

  • callback Function

    returns a list of camers

Properties

opts

Object

Defined in src/Webcam.js:45

Main opts from construction

Webcam.Defaults

Object

Defined in src/Webcam.js:312

Base defaults for option construction

Webcam.OutputTypes

Object static

Defined in src/Webcam.js:340

Global output types Various for platform