Class: Camera

Camera

The Camera class represents a camera. The class contains methods for setting up your camera and checking out camera features.

new Camera()

#CAMERA Camera class
Source:
See:

Methods

getFps() → {number}

Returns the fps (frame per second) value of the camera display.
Source:
See:
Returns:
The fps (frame per second) value of the camera display.
Type
number

getHeight() → {number}

Returns the height of the camera display in pixels.
Source:
See:
Returns:
The height of the camera display in pixels.
Type
number

getId() → {string}

Returns the ID of the camera display.
Source:
See:
Returns:
The ID of the camera display.
Type
string

getName() → {string}

Returns the name of the camera.
Source:
See:
Returns:
The name of the camera.
Type
string

getWidth() → {number}

Returns the width of the camera display in pixels.
Source:
See:
Returns:
The width of the camera display in pixels.
Type
number

setDisplay(displayId)

Set up the camera display to the specified HTML element. If the displayId is empty, the existing camera display will be removed.
Parameters:
Name Type Description
displayId string | null The ID of the HTML element or null.
Source:
See:

setMode(width, height, fps)

Sets the width, height, and fps values of the camera display.
Parameters:
Name Type Description
width number The width of the display in pixels.
height number The height of the display in pixels.
fps number The fps (frame per second) value of the display.
Source:
See:

setQuality(bandwidth, quality)

Set the quality of the display.
Parameters:
Name Type Argument Default Description
bandwidth number The maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second.
quality number <optional>
0 An integer that specifies the required level of picture quality (from 1 to 100).
Source:
See: