Class VideoRecorder
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
Control the Recorder in the scene via MonoBehaviour, providing functional extensions in the Unity environment.
The user has full control over the content of video recording. The screen recording function will not silently record the screen or camera output. The recorded video data needs to be continuously passed through RecordFrame(RenderTexture).
Note: Available only in non-enterprise Sense, Android GLES2/3, and when multi-threaded rendering is disabled.
public class VideoRecorder : MonoBehaviour
- Inheritance
-
VideoRecorder
Fields
AudioProfile
Audio configuration. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public VideoRecorder.AudioProfiles AudioProfile
Field Value
CustomVideoProfile
Custom screen recording configuration. Used when VideoProfile == Custom. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public VideoRecorder.VideoProfiles CustomVideoProfile
Field Value
FilePath
Screen recording file output path. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public string FilePath
Field Value
FilePathType
Screen recording file output path type. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public WritablePathType FilePathType
Field Value
Orientation
Screen recording video orientation. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public VideoRecorder.VideoOrientation Orientation
Field Value
VideoProfile
Video configuration. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public VideoRecorder.RecordProfile VideoProfile
Field Value
ZoomMode
Screen recording scaling mode. Modify it before StartRecording(Action<bool, PermissionStatus, string>, Action<string>) to take effect.
public VideoRecorder.RecordZoomMode ZoomMode
Field Value
Properties
IsAvailable
Whether the screen recording function is available (available only in non-enterprise Sense, Android GLES2/3, and when multi-threaded rendering is disabled).
public static bool IsAvailable { get; }
Property Value
NotAvailableReason
Reasons for unavailability.
public static string NotAvailableReason { get; }
Property Value
Methods
RecordFrame(RenderTexture)
Use texture to record one frame of data.
public void RecordFrame(RenderTexture texture)
Parameters
texture
StartRecording(Action<bool, PermissionStatus, string>, Action<string>)
Start screen recording. The recorded video data needs to be continuously passed through RecordFrame(RenderTexture).
public void StartRecording(Action<bool, PermissionStatus, string> onStart, Action<string> onRecordError)
Parameters
onStartonRecordError
StopRecording()
Stop screen recording.
public bool StopRecording()