Created
February 22, 2022 22:45
-
-
Save ggfan/d4e9fb0471a8ca700982f83b7360329f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val contentValues = ContentValues().apply { | |
put(MediaStore.MediaColumns.DISPLAY_NAME, “CameraX-VideoCapture”) | |
put(MediaStore.MediaColumns.MIME_TYPE, "video/mp4") | |
} | |
val mediaStoreOutputOptions = MediaStoreOutputOptions | |
.Builder(contentResolver, MediaStore.Video.Media.EXTERNAL_CONTENT_URI) | |
.setContentValues(contentValues) | |
.build() | |
recording = videoCapture.output | |
.prepareRecording(this, mediaStoreOutputOptions) | |
.withAudioEnabled() | |
.start(ContextCompat.getMainExecutor(this), recordingListener) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment