Webcam Class
Webcam base class
Constructor
Webcam
(
-
options
Parameters:
-
options
Objectcomposition options used to set
Item Index
Properties
Methods
capture
(
-
location
-
callback
Capture shot
Parameters:
-
location
String -
callback
Function
clear
()
Clear shot and camera memory data
clone
()
Basic camera instance clone
Returns:
Webcam
generateSh
()
String
Generate cli command string
Returns:
String:
getBase64
(
Boolean | String
-
shot
-
callback
Get shot base64 as image if passed Number will return a base 64 in the callback
Parameters:
-
shot
Number | FS.readFileTo be converted
-
callback
FunctionReturns base64 string
Returns:
Boolean | String:
getLastShot
(
Boolean
-
callback
Get last shot taken image data
Parameters:
-
callback
FunctionReturns last shot from getShot return
Returns:
Boolean:
Successful getShot
getShot
(
Boolean
-
shot
-
callback
Get shot buffer from location 0 indexed
Parameters:
-
shot
NumberIndex of shots called
-
callback
FunctionReturns a call from FS.readFile data
Returns:
Boolean:
hasCamera
(
-
callback
Has camera
Parameters:
-
callback
Functionreturns a Boolean
list
(
-
callback
List available cameras
Parameters:
-
callback
Functionreturns a list of camers
Properties
opts
Object
Main opts from construction
Webcam.Defaults
Object
Base defaults for option construction
Webcam.OutputTypes
Object
static
Global output types Various for platform