setMode(width,height,fps) method

If an OzCamera object is added to the program, this method can run on it. It is used to set the width, height and fps of the video stream. The width and height are determined in pixels. All the input parameters are integer.

Parameters

width: Type: number. The width of the display in pixels. e.g. 360

height: Type: number. The height of the display in pixels. e.g. 240

fps: Type: number. The fps (frame per second) value of the display. e.g. 30

Method usage example

In this example we will register our camera to the myCam object, then we will change the width to 360, the height to 240 and the fps to 30. (Code example 1).

//constructor of the myCam object, the default camera is used
var myCam = OzCamera.getCameraByName(); 

myCam.setMode(360, 240, 30); //sets the camera properties
	
Code example 1 - setMode(width,height,fps) method example

More information