expo-camera 15.0.13 → 15.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,11 +10,33 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 15.0.15 — 2024-08-24
14
+
15
+ ### 🎉 New features
16
+
17
+ - On `Android`, add support for setting the aspect ratio of the camera. ([#29822](https://github.com/expo/expo/pull/29822) by [@alanjhughes](https://github.com/alanjhughes))
18
+ - Support mirroring the output of the front facing camera. ([#30430](https://github.com/expo/expo/pull/30430) by [@alanjhughes](https://github.com/alanjhughes))
19
+ - On `Android`, support mirroring video when using front facing camera. Control mirroring with a prop. Deprecate `mirror` option on `takePictureAsync` and `recordAsync`. ([#30548](https://github.com/expo/expo/pull/30548) by [@alanjhughes](https://github.com/alanjhughes))
20
+ - Support pausing and resuming the preview. ([#30666](https://github.com/expo/expo/pull/30666) by [@alanjhughes](https://github.com/alanjhughes))
21
+ - Add `active` prop to stop and start the camera session. Useful with navigation where the camera is can still be active on a previous screen. ([#30802](https://github.com/expo/expo/pull/30802) by [@alanjhughes](https://github.com/alanjhughes))
22
+
23
+ ### 🐛 Bug fixes
24
+
25
+ - On `iOS`, correctly stop the session when the `CameraView` is removed. ([#30580](https://github.com/expo/expo/pull/30580) by [@alanjhughes](https://github.com/alanjhughes))
26
+ - Fix rendering order of child views. ([#30759](https://github.com/expo/expo/pull/30759) by [@alanjhughes](https://github.com/alanjhughes))
27
+ - Set the previews `scaleType` when the aspect ratio is set. ([#30831](https://github.com/expo/expo/pull/30831) by [@alanjhughes](https://github.com/alanjhughes))
28
+ - On Android, fix selecting `pictureSize`. ([#31093](https://github.com/expo/expo/pull/31093) by [@alanjhughes](https://github.com/alanjhughes))
29
+
30
+ ## 15.0.14 — 2024-07-16
31
+
32
+ _This version does not introduce any user-facing changes._
33
+
13
34
  ## 15.0.13 — 2024-07-03
14
35
 
15
36
  ### 🐛 Bug fixes
16
37
 
17
38
  - On `iOS`, fix calling `takePicture` from the simulator. ([#30103](https://github.com/expo/expo/pull/30103) by [@alanjhughes](https://github.com/alanjhughes))
39
+ - On `iOS`, fix touch interactions when using gesture handler. ([#30338](https://github.com/expo/expo/pull/30338) by [@alanjhughes](https://github.com/alanjhughes))
18
40
 
19
41
  ## 15.0.12 — 2024-06-20
20
42
 
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '15.0.13'
4
+ version = '15.0.15'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -14,7 +14,7 @@ android {
14
14
  namespace "expo.modules.camera"
15
15
  defaultConfig {
16
16
  versionCode 32
17
- versionName "15.0.13"
17
+ versionName "15.0.15"
18
18
  }
19
19
  }
20
20
 
@@ -9,4 +9,7 @@ class CameraExceptions {
9
9
 
10
10
  class ImageRetrievalException(url: String) :
11
11
  CodedException("Could not get the image from given url: '$url'")
12
+
13
+ class UnsupportedAspectRatioException(aspectRatio: String) :
14
+ CodedException("Unsupported aspect ratio: '$aspectRatio'")
12
15
  }
@@ -8,6 +8,7 @@ import expo.modules.camera.analyzers.MLKitBarCodeScanner
8
8
  import expo.modules.camera.records.BarcodeSettings
9
9
  import expo.modules.camera.records.BarcodeType
10
10
  import expo.modules.camera.records.CameraMode
11
+ import expo.modules.camera.records.CameraRatio
11
12
  import expo.modules.camera.records.CameraType
12
13
  import expo.modules.camera.records.FlashMode
13
14
  import expo.modules.camera.records.FocusMode
@@ -187,6 +188,20 @@ class CameraViewModule : Module() {
187
188
  view.autoFocus = autoFocus ?: FocusMode.OFF
188
189
  }
189
190
 
191
+ Prop("ratio") { view, ratio: CameraRatio? ->
192
+ if (view.ratio != ratio) {
193
+ view.ratio = ratio
194
+ }
195
+ }
196
+
197
+ Prop("mirror") { view, mirror: Boolean? ->
198
+ mirror?.let {
199
+ view.mirror = it
200
+ return@Prop
201
+ }
202
+ view.mirror = false
203
+ }
204
+
190
205
  OnViewDidUpdateProps { view ->
191
206
  view.createCamera()
192
207
  }
@@ -197,7 +212,7 @@ class CameraViewModule : Module() {
197
212
  } else {
198
213
  val image = CameraViewHelper.generateSimulatorPhoto(view.width, view.height)
199
214
  moduleScope.launch {
200
- ResolveTakenPicture(image, promise, options, cacheDirectory) { response ->
215
+ ResolveTakenPicture(image, promise, options, false, cacheDirectory) { response ->
201
216
  view.onPictureSaved(response)
202
217
  }.resolve()
203
218
  }
@@ -220,6 +235,14 @@ class CameraViewModule : Module() {
220
235
  view.activeRecording?.close()
221
236
  }.runOnQueue(Queues.MAIN)
222
237
 
238
+ AsyncFunction("resumePreview") { view: ExpoCameraView ->
239
+ view.resumePreview()
240
+ }
241
+
242
+ AsyncFunction("pausePreview") { view: ExpoCameraView ->
243
+ view.pausePreview()
244
+ }
245
+
223
246
  OnViewDestroys { view ->
224
247
  view.orientationEventListener.disable()
225
248
  view.cancelCoroutineScope()
@@ -18,6 +18,7 @@ import android.util.Size
18
18
  import android.view.OrientationEventListener
19
19
  import android.view.Surface
20
20
  import android.view.View
21
+ import android.view.ViewGroup
21
22
  import android.view.WindowManager
22
23
  import androidx.annotation.OptIn
23
24
  import androidx.appcompat.app.AppCompatActivity
@@ -33,6 +34,7 @@ import androidx.camera.core.ImageAnalysis
33
34
  import androidx.camera.core.ImageCapture
34
35
  import androidx.camera.core.ImageCaptureException
35
36
  import androidx.camera.core.ImageProxy
37
+ import androidx.camera.core.MirrorMode
36
38
  import androidx.camera.core.Preview
37
39
  import androidx.camera.core.UseCaseGroup
38
40
  import androidx.camera.core.resolutionselector.ResolutionSelector
@@ -56,6 +58,7 @@ import expo.modules.camera.common.PictureSavedEvent
56
58
  import expo.modules.camera.records.BarcodeSettings
57
59
  import expo.modules.camera.records.BarcodeType
58
60
  import expo.modules.camera.records.CameraMode
61
+ import expo.modules.camera.records.CameraRatio
59
62
  import expo.modules.camera.records.CameraType
60
63
  import expo.modules.camera.records.FlashMode
61
64
  import expo.modules.camera.records.FocusMode
@@ -124,9 +127,12 @@ class ExpoCameraView(
124
127
  private var recorder: Recorder? = null
125
128
  private var barcodeFormats: List<BarcodeType> = emptyList()
126
129
 
127
- private var previewView = PreviewView(context)
130
+ private var previewView = PreviewView(context).apply {
131
+ elevation = 0f
132
+ }
128
133
  private val scope = CoroutineScope(Dispatchers.Main)
129
134
  private var shouldCreateCamera = false
135
+ private var previewPaused = false
130
136
 
131
137
  var lensFacing = CameraType.BACK
132
138
  set(value) {
@@ -158,12 +164,24 @@ class ExpoCameraView(
158
164
  shouldCreateCamera = true
159
165
  }
160
166
 
167
+ var ratio: CameraRatio? = null
168
+ set(value) {
169
+ field = value
170
+ shouldCreateCamera = true
171
+ }
172
+
161
173
  var pictureSize: String = ""
162
174
  set(value) {
163
175
  field = value
164
176
  shouldCreateCamera = true
165
177
  }
166
178
 
179
+ var mirror: Boolean = false
180
+ set(value) {
181
+ field = value
182
+ shouldCreateCamera = true
183
+ }
184
+
167
185
  var mute: Boolean = false
168
186
  var animateShutter: Boolean = true
169
187
  var enableTorch: Boolean by Delegates.observable(false) { _, _, newValue ->
@@ -193,18 +211,30 @@ class ExpoCameraView(
193
211
  // Scanning-related properties
194
212
  private var shouldScanBarcodes = false
195
213
 
214
+ override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
215
+ measureChild(previewView, widthMeasureSpec, heightMeasureSpec)
216
+
217
+ setMeasuredDimension(
218
+ ViewGroup.resolveSize(previewView.measuredWidth, widthMeasureSpec),
219
+ ViewGroup.resolveSize(previewView.measuredHeight, heightMeasureSpec)
220
+ )
221
+ }
222
+
196
223
  override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
224
+ if (!changed) {
225
+ return
226
+ }
197
227
  val width = right - left
198
228
  val height = bottom - top
199
-
200
229
  previewView.layout(0, 0, width, height)
201
- postInvalidate(left, top, right, bottom)
202
230
  }
203
231
 
204
- override fun onViewAdded(child: View) {
205
- if (previewView === child) {
232
+ override fun onViewAdded(child: View?) {
233
+ super.onViewAdded(child)
234
+ if (child == previewView) {
206
235
  return
207
236
  }
237
+ child?.bringToFront()
208
238
  removeView(previewView)
209
239
  addView(previewView, 0)
210
240
  }
@@ -240,7 +270,8 @@ class ExpoCameraView(
240
270
  }
241
271
  cacheDirectory.let {
242
272
  scope.launch {
243
- ResolveTakenPicture(data, promise, options, it) { response: Bundle ->
273
+ val shouldMirror = mirror && lensFacing == CameraType.FRONT
274
+ ResolveTakenPicture(data, promise, options, shouldMirror, it) { response: Bundle ->
244
275
  onPictureSaved(response)
245
276
  }.resolve()
246
277
  }
@@ -297,6 +328,7 @@ class ExpoCameraView(
297
328
  }
298
329
  )
299
330
  }
331
+
300
332
  else -> promise.reject(
301
333
  CameraExceptions.VideoRecordingFailed(
302
334
  event.cause?.message
@@ -313,7 +345,7 @@ class ExpoCameraView(
313
345
 
314
346
  @SuppressLint("UnsafeOptInUsageError")
315
347
  fun createCamera() {
316
- if (!shouldCreateCamera) {
348
+ if (!shouldCreateCamera || previewPaused) {
317
349
  return
318
350
  }
319
351
  shouldCreateCamera = false
@@ -321,7 +353,15 @@ class ExpoCameraView(
321
353
  {
322
354
  val cameraProvider: ProcessCameraProvider = providerFuture.get()
323
355
 
356
+ previewView.scaleType = if (ratio == CameraRatio.FOUR_THREE || ratio == CameraRatio.SIXTEEN_NINE) {
357
+ PreviewView.ScaleType.FIT_CENTER
358
+ } else {
359
+ PreviewView.ScaleType.FILL_CENTER
360
+ }
361
+
362
+ val resolutionSelector = buildResolutionSelector()
324
363
  val preview = Preview.Builder()
364
+ .setResolutionSelector(resolutionSelector)
325
365
  .build()
326
366
  .also {
327
367
  it.surfaceProvider = previewView.surfaceProvider
@@ -332,18 +372,7 @@ class ExpoCameraView(
332
372
  .build()
333
373
 
334
374
  imageCaptureUseCase = ImageCapture.Builder()
335
- .apply {
336
- if (pictureSize.isNotEmpty()) {
337
- val size = Size.parseSize(pictureSize)
338
- setTargetResolution(size)
339
- } else {
340
- setResolutionSelector(
341
- ResolutionSelector.Builder()
342
- .setResolutionStrategy(ResolutionStrategy.HIGHEST_AVAILABLE_STRATEGY)
343
- .build()
344
- )
345
- }
346
- }
375
+ .setResolutionSelector(resolutionSelector)
347
376
  .build()
348
377
 
349
378
  val videoCapture = createVideoCapture()
@@ -400,9 +429,33 @@ class ExpoCameraView(
400
429
  }
401
430
  }
402
431
 
432
+ private fun buildResolutionSelector(): ResolutionSelector {
433
+ val strategy = if (pictureSize.isNotEmpty()) {
434
+ val size = Size.parseSize(pictureSize)
435
+ ResolutionStrategy(size, ResolutionStrategy.FALLBACK_RULE_CLOSEST_LOWER_THEN_HIGHER)
436
+ } else {
437
+ ResolutionStrategy.HIGHEST_AVAILABLE_STRATEGY
438
+ }
439
+
440
+ return if (ratio == CameraRatio.ONE_ONE) {
441
+ ResolutionSelector.Builder().setResolutionFilter { supportedSizes, _ ->
442
+ return@setResolutionFilter supportedSizes.filter {
443
+ it.width == it.height
444
+ }
445
+ }.setResolutionStrategy(strategy).build()
446
+ } else {
447
+ ResolutionSelector.Builder().apply {
448
+ ratio?.let {
449
+ setAspectRatioStrategy(it.mapToStrategy())
450
+ }
451
+ setResolutionStrategy(strategy)
452
+ }.build()
453
+ }
454
+ }
455
+
403
456
  private fun createVideoCapture(): VideoCapture<Recorder> {
404
457
  val preferredQuality = videoQuality.mapToQuality()
405
- val fallbackStrategy = FallbackStrategy.lowerQualityOrHigherThan(preferredQuality)
458
+ val fallbackStrategy = FallbackStrategy.higherQualityOrLowerThan(preferredQuality)
406
459
  val qualitySelector = QualitySelector.from(preferredQuality, fallbackStrategy)
407
460
 
408
461
  val recorder = Recorder.Builder()
@@ -413,9 +466,12 @@ class ExpoCameraView(
413
466
  this.recorder = it
414
467
  }
415
468
 
416
- return VideoCapture.Builder(recorder)
417
- .setVideoStabilizationEnabled(true)
418
- .build()
469
+ return VideoCapture.Builder(recorder).apply {
470
+ if (mirror) {
471
+ setMirrorMode(MirrorMode.MIRROR_MODE_ON_FRONT_ONLY)
472
+ }
473
+ setVideoStabilizationEnabled(true)
474
+ }.build()
419
475
  }
420
476
 
421
477
  private fun startFocusMetering() {
@@ -439,6 +495,7 @@ class ExpoCameraView(
439
495
  onCameraReady(Unit)
440
496
  setTorchEnabled(enableTorch)
441
497
  }
498
+
442
499
  else -> {}
443
500
  }
444
501
  }
@@ -452,6 +509,17 @@ class ExpoCameraView(
452
509
  } ?: emptyList()
453
510
  }
454
511
 
512
+ fun resumePreview() {
513
+ shouldCreateCamera = true
514
+ previewPaused = false
515
+ createCamera()
516
+ }
517
+
518
+ fun pausePreview() {
519
+ previewPaused = true
520
+ cameraProvider?.unbindAll()
521
+ }
522
+
455
523
  fun setShouldScanBarcodes(shouldScanBarcodes: Boolean) {
456
524
  this.shouldScanBarcodes = shouldScanBarcodes
457
525
  shouldCreateCamera = true
@@ -566,7 +634,13 @@ class ExpoCameraView(
566
634
  parent?.layout(0, 0, parent.measuredWidth, parent.measuredHeight)
567
635
  }
568
636
  })
569
- addView(previewView)
637
+ addView(
638
+ previewView,
639
+ ViewGroup.LayoutParams(
640
+ ViewGroup.LayoutParams.MATCH_PARENT,
641
+ ViewGroup.LayoutParams.MATCH_PARENT
642
+ )
643
+ )
570
644
  }
571
645
 
572
646
  fun onPictureSaved(response: Bundle) {
@@ -9,6 +9,7 @@ data class PictureOptions(
9
9
  @Field val base64: Boolean = false,
10
10
  @Field val exif: Boolean = false,
11
11
  @Field val additionalExif: Map<String, Any>? = null,
12
+ @Field val mirror: Boolean = false,
12
13
  @Field val skipProcessing: Boolean = false,
13
14
  @Field val fastMode: Boolean = false,
14
15
  @Field val id: Int? = null,
@@ -3,8 +3,10 @@ package expo.modules.camera.records
3
3
  import android.hardware.camera2.CameraMetadata
4
4
  import androidx.camera.core.CameraSelector
5
5
  import androidx.camera.core.ImageCapture
6
+ import androidx.camera.core.resolutionselector.AspectRatioStrategy
6
7
  import androidx.camera.video.Quality
7
8
  import com.google.mlkit.vision.barcode.common.Barcode
9
+ import expo.modules.camera.CameraExceptions
8
10
  import expo.modules.kotlin.records.Field
9
11
  import expo.modules.kotlin.records.Record
10
12
  import expo.modules.kotlin.types.Enumerable
@@ -24,6 +26,18 @@ enum class CameraType(val value: String) : Enumerable {
24
26
  }
25
27
  }
26
28
 
29
+ enum class CameraRatio(val value: String) : Enumerable {
30
+ FOUR_THREE("4:3"),
31
+ SIXTEEN_NINE("16:9"),
32
+ ONE_ONE("1:1");
33
+
34
+ fun mapToStrategy() = when (this) {
35
+ FOUR_THREE -> AspectRatioStrategy.RATIO_4_3_FALLBACK_AUTO_STRATEGY
36
+ SIXTEEN_NINE -> AspectRatioStrategy.RATIO_16_9_FALLBACK_AUTO_STRATEGY
37
+ else -> throw CameraExceptions.UnsupportedAspectRatioException(this.value)
38
+ }
39
+ }
40
+
27
41
  enum class VideoQuality(val value: String) : Enumerable {
28
42
  VIDEO2160P("2160p"),
29
43
  VIDEO1080P("1080p"),
@@ -43,10 +43,10 @@ class ResolveTakenPicture(
43
43
  private var imageData: ByteArray,
44
44
  private var promise: Promise,
45
45
  private var options: PictureOptions,
46
+ private var mirror: Boolean,
46
47
  private val directory: File,
47
48
  private var pictureSavedDelegate: PictureSavedDelegate
48
49
  ) {
49
-
50
50
  private val quality: Int
51
51
  get() = (options.quality * 100).toInt()
52
52
 
@@ -76,7 +76,7 @@ class ResolveTakenPicture(
76
76
  // Get orientation of the image from mImageData via inputStream
77
77
  val orientation = exifInterface.getAttributeInt(
78
78
  ExifInterface.TAG_ORIENTATION,
79
- ExifInterface.ORIENTATION_UNDEFINED
79
+ ExifInterface.ORIENTATION_NORMAL
80
80
  )
81
81
 
82
82
  val bitmapOptions = BitmapFactory
@@ -90,7 +90,7 @@ class ResolveTakenPicture(
90
90
  // If OOM exception was thrown, we try to use downsampling to recover.
91
91
  while (bitmapOptions.inSampleSize <= options.maxDownsampling) {
92
92
  try {
93
- bitmap = decodeBitmap(imageData, orientation, options.exif, bitmapOptions)
93
+ bitmap = decodeBitmap(imageData, orientation, options, bitmapOptions)
94
94
  break
95
95
  } catch (exception: OutOfMemoryError) {
96
96
  bitmapOptions.inSampleSize *= 2
@@ -222,9 +222,9 @@ class ResolveTakenPicture(
222
222
  return null
223
223
  }
224
224
 
225
- private fun decodeBitmap(imageData: ByteArray, orientation: Int, exif: Boolean, bitmapOptions: BitmapFactory.Options): Bitmap {
225
+ private fun decodeBitmap(imageData: ByteArray, orientation: Int, options: PictureOptions, bitmapOptions: BitmapFactory.Options): Bitmap {
226
226
  // Rotate the bitmap to the proper orientation if needed
227
- return if (!exif) {
227
+ return if (!options.exif) {
228
228
  decodeAndRotateBitmap(imageData, getImageRotation(orientation), bitmapOptions)
229
229
  } else {
230
230
  BitmapFactory.decodeByteArray(imageData, 0, imageData.size, bitmapOptions)
@@ -234,7 +234,12 @@ class ResolveTakenPicture(
234
234
  private fun decodeAndRotateBitmap(imageData: ByteArray, angle: Int, options: BitmapFactory.Options): Bitmap {
235
235
  val source = BitmapFactory.decodeByteArray(imageData, 0, imageData.size, options)
236
236
  val matrix = Matrix()
237
- matrix.postRotate(angle.toFloat())
237
+ matrix.apply {
238
+ postRotate(angle.toFloat())
239
+ if (mirror) {
240
+ postScale(-1f, 1f)
241
+ }
242
+ }
238
243
  return Bitmap.createBitmap(source, 0, 0, source.width, source.height, matrix, true)
239
244
  }
240
245
 
@@ -5,6 +5,7 @@ export type CameraType = 'front' | 'back';
5
5
  export type FlashMode = 'off' | 'on' | 'auto';
6
6
  export type ImageType = 'png' | 'jpg';
7
7
  export type CameraMode = 'picture' | 'video';
8
+ export type CameraRatio = '4:3' | '16:9' | '1:1';
8
9
  /**
9
10
  * This option specifies the mode of focus on the device.
10
11
  * - `on` - Indicates that the device should autofocus once and then lock the focus.
@@ -122,6 +123,14 @@ export type CameraPictureOptions = {
122
123
  * @platform web
123
124
  */
124
125
  isImageMirror?: boolean;
126
+ /**
127
+ * When set to `true`, the output image will be flipped along the vertical axis when using the front camera.
128
+ * @default false
129
+ * @platform ios
130
+ * @platform android
131
+ * @deprecated Use `mirror` prop on `CameraView` instead.
132
+ */
133
+ mirror?: boolean;
125
134
  /**
126
135
  * @hidden
127
136
  */
@@ -147,7 +156,7 @@ export type CameraRecordingOptions = {
147
156
  /**
148
157
  * If `true`, the recorded video will be flipped along the vertical axis. iOS flips videos recorded with the front camera by default,
149
158
  * but you can reverse that back by setting this to `true`. On Android, this is handled in the user's device settings.
150
- * @platform ios
159
+ * @deprecated Use `mirror` prop on `CameraView` instead.
151
160
  */
152
161
  mirror?: boolean;
153
162
  /**
@@ -275,12 +284,24 @@ export type CameraProps = ViewProps & {
275
284
  * @default false
276
285
  */
277
286
  mute?: boolean;
287
+ /**
288
+ * A boolean that determines whether the camera should mirror the image when using the front camera.
289
+ * @default false
290
+ */
291
+ mirror?: boolean;
278
292
  /**
279
293
  * Indicates the focus mode to use.
280
294
  * @default off
281
295
  * @platform ios
282
296
  */
283
297
  autofocus?: FocusMode;
298
+ /**
299
+ * A boolean that determines whether the camera should be active.
300
+ * Useful in situations where the camera may not have unmounted but you still want to stop the camera session.
301
+ * @default true
302
+ * @platform ios
303
+ */
304
+ active?: boolean;
284
305
  /**
285
306
  * Specify the quality of the recorded video. Use one of `VideoQuality` possible values:
286
307
  * for 16:9 resolution `2160p`, `1080p`, `720p`, `480p` : `Android only` and for 4:3 `4:3` (the size is 640x480).
@@ -302,21 +323,12 @@ export type CameraProps = ViewProps & {
302
323
  * @default false
303
324
  */
304
325
  enableTorch?: boolean;
305
- /**
306
- * Callback invoked when camera preview has been set.
307
- */
308
- onCameraReady?: () => void;
309
326
  /**
310
327
  * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).
311
328
  * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).
312
329
  * @platform ios
313
330
  */
314
331
  videoStabilizationMode?: VideoStabilization;
315
- /**
316
- * Callback invoked when camera preview could not been started.
317
- * @param event Error object that contains a `message`.
318
- */
319
- onMountError?: (event: CameraMountError) => void;
320
332
  /**
321
333
  * @example
322
334
  * ```tsx
@@ -328,15 +340,6 @@ export type CameraProps = ViewProps & {
328
340
  * ```
329
341
  */
330
342
  barcodeScannerSettings?: BarcodeSettings;
331
- /**
332
- * Callback that is invoked when a barcode has been successfully scanned. The callback is provided with
333
- * an object of the [`BarcodeScanningResult`](#barcodescanningresult) shape, where the `type`
334
- * refers to the barcode type that was scanned and the `data` is the information encoded in the barcode
335
- * (in this case of QR codes, this is often a URL). See [`BarcodeType`](#barcodetype) for supported values.
336
- * for supported values.
337
- * @param scanningResult
338
- */
339
- onBarcodeScanned?: (scanningResult: BarcodeScanningResult) => void;
340
343
  /**
341
344
  * A URL for an image to be shown while the camera is loading.
342
345
  * @platform web
@@ -348,6 +351,31 @@ export type CameraProps = ViewProps & {
348
351
  * @platform ios
349
352
  */
350
353
  responsiveOrientationWhenOrientationLocked?: boolean;
354
+ /**
355
+ * A string representing the aspect ratio of the preview. For example, `4:3` and `16:9`.
356
+ * Note: Setting the aspect ratio here will change the scaleType of the camera preview from `FILL` to `FIT`.
357
+ * Also, when using 1:1, devices only support certain sizes. If you specify an unsupported size, the closest supported ratio will be used.
358
+ * @platform android
359
+ */
360
+ ratio?: CameraRatio;
361
+ /**
362
+ * Callback invoked when camera preview has been set.
363
+ */
364
+ onCameraReady?: () => void;
365
+ /**
366
+ * Callback invoked when camera preview could not start.
367
+ * @param event Error object that contains a `message`.
368
+ */
369
+ onMountError?: (event: CameraMountError) => void;
370
+ /**
371
+ * Callback that is invoked when a barcode has been successfully scanned. The callback is provided with
372
+ * an object of the [`BarcodeScanningResult`](#barcodescanningresult) shape, where the `type`
373
+ * refers to the barcode type that was scanned, and the `data` is the information encoded in the barcode
374
+ * (in this case of QR codes, this is often a URL). See [`BarcodeType`](#barcodetype) for supported values.
375
+ * for supported values.
376
+ * @param scanningResult
377
+ */
378
+ onBarcodeScanned?: (scanningResult: BarcodeScanningResult) => void;
351
379
  /**
352
380
  * Callback invoked when responsive orientation changes. Only applicable if `responsiveOrientationWhenOrientationLocked` is `true`
353
381
  * @param event result object that contains updated orientation of camera
@@ -366,6 +394,8 @@ export interface CameraViewRef {
366
394
  }>;
367
395
  readonly stopRecording: () => Promise<void>;
368
396
  readonly launchModernScanner: () => Promise<void>;
397
+ readonly resumePreview: () => Promise<void>;
398
+ readonly pausePreview: () => Promise<void>;
369
399
  }
370
400
  /**
371
401
  * @hidden
@@ -388,6 +418,7 @@ export type CameraNativeProps = {
388
418
  autoFocus?: FocusMode;
389
419
  mute?: boolean;
390
420
  zoom?: number;
421
+ ratio?: CameraRatio;
391
422
  barcodeScannerSettings?: BarcodeSettings;
392
423
  barcodeScannerEnabled?: boolean;
393
424
  poster?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Camera.types.d.ts","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpE;;;GAGG;AAC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