Camera
Wisej.Web.Ext.Camera.Camera
Namespace: Wisej.Web.Ext.Camera
Assembly: Wisej.Web.Ext.Camera (3.2.0.0)
The Camera component makes it possible to take pictures with the device's camera and upload them to the server.
public class Camera : Control, IWisejHandlerPublic Class Camera
Inherits Control
Implements IWisejHandlerConstructors
Camera()
Initializes a new instance of the Camera class.
Properties
Audio
Boolean: Specifies whether audio should be recorded. (Default: False)
BorderStyle
BorderStyle: Indicates the border style for the control. (Default: Solid)
DeviceName
String: Specifies the video device to use. (Default: "")
If not specified or invalid it will use the first device returned by the browser.
FacingMode
VideoFacingMode: Specifies whether the video is front-facing (mobile-only). (Default: True)
HeightCapture
Int32: Video capture resolution - Height (Default: True)
Mirror
Boolean: Specifies whether the media should be mirrored. (Default: False)
ObjectFit
ObjectFit: Specifies the object-fit to apply to the video. (Default: True)
See css3_object-fit.
Video
Boolean: Specifies whether video should be recorded. (Default: True)
VideoFilter
String: Returns or sets the filter (filter) to apply to the video. (Default: null)
WidthCapture
Int32: Video capture resolution - Width (Default: True)
Methods
GetDevices(callback)
Returns the names of the available video devices.
Throws:
ArgumentNullException callback is null.
GetDevices(refresh, callback)
Returns the names of the available video devices.
Throws:
ArgumentNullException callback is null.
GetDevicesAsync(refresh)
Returns the names of the available video devices.
Returns: Task<String[]>. An awaitable Task.
GetImage(callback)
Returns the current image from the camera.
Throws:
ArgumentNullException callback is null.
GetImageAsync()
Returns the current image from the camera asynchronously.
Returns: Task<Image>. An awaitable Task.
StartRecording(format, bitsPerSecond, updateInterval)
Starts recording.
updateInterval
Update interval in seconds. The default is zero causing the video to be uploaded on StopRecording.
You must call StopRecordingto end recording.
StopRecording()
Stops recording and uploads the recorded stream to the Uploaded event.
Events
Error
CameraErrorHandler Fired when an error occurs in the camera setup or usage.
Progress
UploadProgressEventHandler Fired while the Camera control receives the recording stream being uploaded.
This event fires only if there is an handler attached to it. A simple overload of the On[Event] method in a derived class will not be invoked unless there is at least one handler attached to the event.
Uploaded
UploadedEventHandler Fired when the current recording is available for download.
Last updated
Was this helpful?