Webcam Class
Webcam base class
Constructor
Webcam
(
-
options
Parameters:
-
optionsObjectcomposition options used to set
Item Index
Properties
Methods
capture
(
-
location -
callback
Capture shot
Parameters:
-
locationString -
callbackFunction
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:
-
shotNumber | FS.readFileTo be converted
-
callbackFunctionReturns base64 string
Returns:
Boolean | String:
getLastShot
(
Boolean
-
callback
Get last shot taken image data
Parameters:
-
callbackFunctionReturns last shot from getShot return
Returns:
Boolean:
Successful getShot
getShot
(
Boolean
-
shot -
callback
Get shot buffer from location 0 indexed
Parameters:
-
shotNumberIndex of shots called
-
callbackFunctionReturns a call from FS.readFile data
Returns:
Boolean:
hasCamera
(
-
callback
Has camera
Parameters:
-
callbackFunctionreturns a Boolean
list
(
-
callback
List available cameras
Parameters:
-
callbackFunctionreturns 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
