get Live Preview
Start live preview as motion JPEG.
Return
You can get the newest frame in a CoroutineScope like this:
getLivePreview()
.conflate()
.collect { byteReadPacket ->
if (isActive) {
// Read byteReadPacket
}
byteReadPacket.release()
}
Content copied to clipboard
Start live preview as motion JPEG.
Parameters
frame Handler
Called for each JPEG frame. If frameHandler returns false, live preview finishes.
Throws
Command is currently disabled; for example, the camera is shooting a video.