CameraVideoOutput
interface CameraVideoOutput extends CameraOutputA Video output allows recording videos (possibly with audio) to a file.
See
Example
const videoOutput = useVideoOutput({})Properties
mediaType
readonly mediaType: MediaTypeThe media type of the content being streamed
by this CameraOutput.
Inherited from
outputOrientation
outputOrientation: OrientationGets or sets the output orientation of this CameraOutput.
Individual implementations of CameraOutput
may choose different strategies for implementing
output orientation, for example:
- A Photo output might apply orientation via EXIF flags.
- A Video output might apply orientation via track transform metadata.
- A Preview output might apply orientation via view transforms.
- A Frame output might not apply orientation and only pass it as a
property via the
Frameobject, unless explicitly configured to physically rotate buffers.
Inherited from
CameraOutput.outputOrientation
outputType
readonly outputType: CameraOutputTypeThe type of the CameraOutput.
Inherited from
Methods
createRecorder()
createRecorder(settings: RecorderSettings): Promise<Recorder>Creates and prepares a new Recorder
instance with the given RecorderSettings.
The Recorder will record to a temporary
file, and can only record once.
If you want to create a second recording,
you must create a new Recorder.
getSupportedVideoCodecs()
getSupportedVideoCodecs(): VideoCodec[]Get all supported VideoCodecs this
CameraVideoOutput currently can record in.
This method must be called after the CameraVideoOutput
has been attached to a Camera Session.
Throws
This method throws if you call it before this output
is attached to a Camera Session (via configure(...))
setOutputSettings()
setOutputSettings(settings: VideoOutputSettings): Promise<void>Set the output settings for this video output.
This method must be called after the output has been
attached to the Camera Session, and before
createRecorder(...).