CameraView

class CameraView()

CreateCameraView()

Также имеет следующие методы:

  • GetHeight()
  • GetVisibility()
  • GetWidth()
  • SetMargins()
  • SetPosition()
  • SetSize()
  • SetVisibility()
CameraView.AutoCapture(folder, fileName, maxCount)
CameraView.Destroy()
CameraView.FindFaces(maxFaces)
CameraView.Focus()
CameraView.GetAbsHeight()
CameraView.GetAbsWidth()
CameraView.GetCameraCount()
CameraView.GetColorEffects()
CameraView.GetImageHeight()
CameraView.GetImageWidth()
CameraView.GetMaxZoom()
CameraView.GetParameters()
CameraView.GetPictureSizes()
CameraView.GetPixelData(format, left, top, width, height)

format can be “rawbase64”, “pngbase64” or “jpgbase64”

CameraView.GetPosition()
CameraView.GetType()
CameraView.GetZoom()
CameraView.IsRecording()
CameraView.MotionMosaic(xtiles, ytiles, sensitivity, minPeriod, imageObj)
CameraView.Record(fileName, seconds);()
CameraView.Release()
CameraView.ReportColors(list, callback, sampSize, maxRate)
cam.ReportColors('0.5,0.5', OnColor, 16, 300);

function OnColor(colors){
    color = colors[0]
    /*
     * red = color[0]
     * green = color[1]
     * blue = colors[2]
     */
}
CameraView.SetBackGradient(color1, color2, color3, p4, p5, p6, p7)
CameraView.SetBackGradientRadial(x, y, r, color1, color2, color3, p7)
CameraView.SetBackground(imagefile, options)
CameraView.SetColorEffect(effect)

use in SetOnReady

CameraView.SetDuplicateImage(img1, img2)
CameraView.SetFlash(onoff)
CameraView.SetFocusMode(mode)
  • mode

    • Video
CameraView.SetOnFocus(callback)
CameraView.SetOnMotion(callback)
cam.SetOnMotion(function(data){});
CameraView.SetOnPicture(callback)
CameraView.SetOnReady(callback)
CameraView.SetPadding(...)
CameraView.SetParameter(name, value)
CameraView.SetPictureSize(width, height)
CameraView.SetPosition(...)
CameraView.SetPreviewImage(imageObj)
CameraView.SetScale(x, y)
CameraView.SetSound(onoff)
CameraView.SetZoom(level)
CameraView.StartPreview()
CameraView.Stop()
CameraView.StopPreview()
CameraView.Stream(ip, port, quality, fps, mtu)
CameraView.TakePicture(fileName)