LensStudio:Preview.CameraView
EnumEnum selecting which device camera the preview simulates.
Index
Example
Switch a preview between the front and back camera. The preview must already have an input, because a Config whose input type is StreamType.None is rejected.
import { LensPreview } from 'LensStudio:LensPreview';
import { CameraView } from 'LensStudio:Preview';
export function flipCamera(preview: LensPreview): CameraView {
const config = preview.config;
config.cameraView = config.cameraView === CameraView.Front ? CameraView.Back : CameraView.Front;
preview.config = config;
return preview.config.cameraView;
}
Enumeration Members
Back
Back:
number
The rear-facing camera.
Front
Front:
number
The front-facing camera.