Once the Dynamsoft camera object is initialized, you can control it like a normal JS object. You can refer to our online API Documentation to check all built-in methods and events of Dynamsoft Camera SDK.
// Method /// <summary> /// Rotates the image of a specified index in buffer by 90 degrees clockwise. /// </summary> /// <param name='index' type='int'> specifies the index of image in buffer. The index is 0-based.</param> /// <returns type='bool'></returns> imageViewer.image.rotateRight(0); // rotate the 1st image in the buffer by 90 degrees clockwise
Events are triggered when certain trigger points are reached. For example, we have an onmouseclick event for mouse clicking, an onmouserightclick event for mouse right clicking in the built-in video viewer and image viewer, etc.
To use onmouseclick event in the video viewer, please refer to the sample code below:
Alternatively, you can write code like this: