OzCamera class

You can add your camera as an object in the OzCamera class. It contains methods for setting up your camera and checking out camera features.

Constructors

The constructors make it possible to add a camera as an object to the program.

ConstructorDescription
OzCamera.getCameraByName(cameraname) The object -created with this constructor- will represent the camera. The input parameter of the constructor is the name of the camera, which you can check with the OzCamera.getNames() method. Or you can put in nothing. Example usage:
var myCam = OzCamera.getCameraByName();

If you write no input parameter, the default camera will be used.
OzCamera.getCameraByIndex(index) The object -created with this constructor- will represent the camera. The input parameter of the constructor is the index of the camera. This is a better choice than the other constructor if more cameras with the same name are connected to the computer. Example usage:
var myCam = OzCamera.getCameraByIndex(0);

Methods

MethodDescription
getFps()Returns the frames per second value of the video stream.
getHeight()Returns the height of the video stream in pixels.
getId()Returns the ID of the camera display.
getName()Returns the name of the camera the object represents.
getWidth()Returns the width of the video stream in pixels.
OzCamera.getNames()Returns the names of available cameras.
OzCamera.getCameraByIndex(index)Returns a new Camera object or null if the given index is not present in the array.
OzCamera.getCameraByName(cameraName)Returns a new Camera object or null if the given cameraName does not exists.
setDisplay(displayId)Sets which display should show the video stream.
setMode(width,height,fps)Sets the width, height and fps of the video stream.
setQuality(bandwidth, quality)Sets the transmission bandwidth and quality of the video stream.

Events

EventDescription
onSessionStateChangedThis event occurs when the state of an active session has changed.

If you have any questions or need assistance, please contact us at  info@ozekiphone.com

More information