-
-
Save olokobayusuf/24f2f9639d72a614fb02c0de4650d30c 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
// Create a device query to discover the rear camera | |
var query = new MediaDeviceQuery(MediaDeviceCriteria.RearCamera); | |
// Get the rear camera | |
var device = query.current as CameraDevice; | |
// Create a texture output to convert pixel buffers to textures | |
var textureOutput = new TextureOutput(); | |
// Start the camera preview | |
device.StartRunning(textureOutput); | |
// Get the preview texture from the texture output | |
Texture2D previewTexture = await textureOutput; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment