setCameraPosition method
- CameraPosition position
Implementation
Future<void> setCameraPosition(CameraPosition position) async {
final options = currentOptions;
if (options is! CameraCaptureOptions) {
logger.warning('Not a camera track');
return;
}
final newOptions = CameraCaptureOptions(
cameraPosition: position,
deviceId: null,
maxFrameRate: options.maxFrameRate,
params: options.params);
await restartTrack(newOptions);
await replaceTrackForMultiCodecSimulcast(mediaStreamTrack);
currentOptions = newOptions;
}