expo-camera 17.1.0-canary-20251216-6e1f9a7 → 17.1.0-canary-20251223-b83b31e

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/camera/CameraViewModule.kt +13 -0
  4. package/android/src/main/java/expo/modules/camera/ExpoCameraView.kt +45 -5
  5. package/android/src/main/java/expo/modules/camera/records/CameraRecords.kt +12 -1
  6. package/build/Camera.types.d.ts +18 -3
  7. package/build/Camera.types.d.ts.map +1 -1
  8. package/build/Camera.types.js.map +1 -1
  9. package/build/ExpoCameraManager.web.d.ts +1 -0
  10. package/build/ExpoCameraManager.web.d.ts.map +1 -1
  11. package/build/ExpoCameraManager.web.js +1 -0
  12. package/build/ExpoCameraManager.web.js.map +1 -1
  13. package/expo-module.config.json +1 -1
  14. package/ios/CameraViewModule.swift +14 -4
  15. package/ios/Common/ExpoCameraUtils.swift +2 -2
  16. package/ios/Current/CameraEnums.swift +22 -1
  17. package/ios/Current/CameraPhotoCapture.swift +5 -0
  18. package/ios/Current/CameraVideoRecording.swift +7 -1
  19. package/ios/Current/CameraView.swift +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar → 17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar} +0 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar.md5 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar.sha1 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar.sha256 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar.sha512 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar +0 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar.md5 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar.sha1 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar.sha256 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar.sha512 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.module → 17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.module} +22 -22
  31. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.module.md5 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.module.sha1 +1 -0
  33. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.module.sha256 +1 -0
  34. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.module.sha512 +1 -0
  35. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.pom → 17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.pom} +1 -1
  36. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.pom.md5 +1 -0
  37. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.pom.sha1 +1 -0
  38. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.pom.sha256 +1 -0
  39. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251223-b83b31e/expo.modules.camera-17.1.0-canary-20251223-b83b31e.pom.sha512 +1 -0
  40. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml +4 -4
  41. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.md5 +1 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha1 +1 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha256 +1 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha512 +1 -1
  45. package/package.json +3 -3
  46. package/src/Camera.types.ts +18 -3
  47. package/src/ExpoCameraManager.web.ts +1 -0
  48. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar.md5 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar.sha1 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar.sha256 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar.sha512 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar +0 -0
  53. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar.md5 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar.sha1 +0 -1
  55. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar.sha256 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar.sha512 +0 -1
  57. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.module.md5 +0 -1
  58. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.module.sha1 +0 -1
  59. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.module.sha256 +0 -1
  60. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.module.sha512 +0 -1
  61. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.pom.md5 +0 -1
  62. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.pom.sha1 +0 -1
  63. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.pom.sha256 +0 -1
  64. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251216-6e1f9a7/expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -7,11 +7,14 @@
7
7
  ### 🎉 New features
8
8
 
9
9
  - Allow disabling the barcode scanner functionality via config plugin. ([#40444](https://github.com/expo/expo/pull/40444) by [@alanjhughes](https://github.com/alanjhughes))
10
+ - Allow users to set video stabilization mode when recording videos. ([#41666](https://github.com/expo/expo/pull/41666) by [@alanjhughes](https://github.com/alanjhughes))
11
+ - [Android] Add support for screen flash on the front camera. ([#41667](https://github.com/expo/expo/pull/41667) by [@alanjhughes](https://github.com/alanjhughes))
10
12
 
11
13
  ### 🐛 Bug fixes
12
14
 
13
15
  - [Android] Fix certain exif keys being dropped because of invalid values. ([#41043](https://github.com/expo/expo/pull/41043) by [@alanjhughes](https://github.com/alanjhughes))
14
16
  - [Android] Fix camera not being recreated on the old architecture. ([#41405](https://github.com/expo/expo/pull/41405) by [@alanjhughes](https://github.com/alanjhughes))
17
+ - [iOS] Return correct size information when using image refs. ([#41658](https://github.com/expo/expo/pull/41658) by [@alanjhughes](https://github.com/alanjhughes))
15
18
 
16
19
  ### 💡 Others
17
20
 
@@ -4,7 +4,7 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '17.1.0-canary-20251216-6e1f9a7'
7
+ version = '17.1.0-canary-20251223-b83b31e'
8
8
 
9
9
  def barcodeScannerEnabled = findProperty('expo.camera.barcode-scanner-enabled')
10
10
  def isBarcodeScannerEnabled = (barcodeScannerEnabled ?: "true").toString() != "false"
@@ -13,7 +13,7 @@ android {
13
13
  namespace "expo.modules.camera"
14
14
  defaultConfig {
15
15
  versionCode 32
16
- versionName "17.1.0-canary-20251216-6e1f9a7"
16
+ versionName "17.1.0-canary-20251223-b83b31e"
17
17
  }
18
18
  }
19
19
 
@@ -18,6 +18,7 @@ import expo.modules.camera.records.CameraType
18
18
  import expo.modules.camera.records.FlashMode
19
19
  import expo.modules.camera.records.FocusMode
20
20
  import expo.modules.camera.records.VideoQuality
21
+ import expo.modules.camera.records.VideoStabilizationMode
21
22
  import expo.modules.camera.tasks.ResolveTakenPicture
22
23
  import expo.modules.camera.tasks.writeStreamToFile
23
24
  import expo.modules.camera.utils.CameraUtils
@@ -332,6 +333,18 @@ class CameraViewModule : Module() {
332
333
  }
333
334
  }
334
335
 
336
+ Prop("videoStabilizationMode") { view, mode: VideoStabilizationMode? ->
337
+ mode?.let {
338
+ if (view.videoStabilizationMode != it) {
339
+ view.videoStabilizationMode = it
340
+ }
341
+ } ?: run {
342
+ if (view.videoStabilizationMode != VideoStabilizationMode.AUTO) {
343
+ view.videoStabilizationMode = VideoStabilizationMode.AUTO
344
+ }
345
+ }
346
+ }
347
+
335
348
  Prop("barcodeScannerSettings") { view, settings: BarcodeSettings? ->
336
349
  if (!CameraUtils.isMLKitBarcodeScannerAvailable()) {
337
350
  appContext.jsLogger?.warn("Barcode scanning has been disabled")
@@ -62,6 +62,7 @@ import expo.modules.camera.records.CameraType
62
62
  import expo.modules.camera.records.FlashMode
63
63
  import expo.modules.camera.records.FocusMode
64
64
  import expo.modules.camera.records.VideoQuality
65
+ import expo.modules.camera.records.VideoStabilizationMode
65
66
  import expo.modules.camera.tasks.ResolveTakenPicture
66
67
  import expo.modules.camera.utils.BarCodeScannerResult
67
68
  import expo.modules.camera.utils.BarCodeScannerResult.BoundingBox
@@ -185,6 +186,12 @@ class ExpoCameraView(
185
186
  shouldCreateCamera = true
186
187
  }
187
188
 
189
+ var videoStabilizationMode: VideoStabilizationMode = VideoStabilizationMode.AUTO
190
+ set(value) {
191
+ field = value
192
+ shouldCreateCamera = true
193
+ }
194
+
188
195
  var ratio: CameraRatio? = null
189
196
  set(value) {
190
197
  field = value
@@ -317,7 +324,20 @@ class ExpoCameraView(
317
324
  }
318
325
 
319
326
  fun setCameraFlashMode(mode: FlashMode) {
320
- imageCaptureUseCase?.flashMode = mode.mapToLens()
327
+ val currentMode = if (mode == FlashMode.SCREEN && lensFacing != CameraType.FRONT) {
328
+ FlashMode.ON
329
+ } else {
330
+ mode
331
+ }
332
+
333
+ if (currentMode == FlashMode.SCREEN) {
334
+ appContext.currentActivity?.window?.let { window ->
335
+ previewView.setScreenFlashWindow(window)
336
+ imageCaptureUseCase?.screenFlash = previewView.screenFlash
337
+ }
338
+ }
339
+
340
+ imageCaptureUseCase?.flashMode = currentMode.mapToLens()
321
341
  }
322
342
 
323
343
  private fun setTorchEnabled(enabled: Boolean) {
@@ -450,10 +470,30 @@ class ExpoCameraView(
450
470
  .requireLensFacing(lensFacing.mapToCharacteristic())
451
471
  .build()
452
472
 
453
- imageCaptureUseCase = ImageCapture.Builder()
473
+ // Screen flash only works with front camera - fall back to ON for back camera
474
+ val currentFlashMode = if (flashMode == FlashMode.SCREEN && lensFacing != CameraType.FRONT) {
475
+ FlashMode.ON
476
+ } else {
477
+ flashMode
478
+ }
479
+
480
+ if (currentFlashMode == FlashMode.SCREEN) {
481
+ appContext.currentActivity?.window?.let { window ->
482
+ previewView.setScreenFlashWindow(window)
483
+ }
484
+ }
485
+
486
+ val imageCaptureBuilder = ImageCapture.Builder()
454
487
  .setResolutionSelector(resolutionSelector)
455
- .setFlashMode(flashMode.mapToLens())
456
- .build()
488
+ .setFlashMode(currentFlashMode.mapToLens())
489
+
490
+ if (currentFlashMode == FlashMode.SCREEN) {
491
+ previewView.screenFlash?.let { screenFlash ->
492
+ imageCaptureBuilder.setScreenFlash(screenFlash)
493
+ }
494
+ }
495
+
496
+ imageCaptureUseCase = imageCaptureBuilder.build()
457
497
 
458
498
  val videoCapture = createVideoCapture()
459
499
  imageAnalysisUseCase = createImageAnalyzer()
@@ -572,7 +612,7 @@ class ExpoCameraView(
572
612
  if (mirror) {
573
613
  setMirrorMode(MirrorMode.MIRROR_MODE_ON_FRONT_ONLY)
574
614
  }
575
- setVideoStabilizationEnabled(true)
615
+ setVideoStabilizationEnabled(videoStabilizationMode.isEnabled())
576
616
  }.build()
577
617
  }
578
618
 
@@ -50,12 +50,14 @@ enum class VideoQuality(val value: String) : Enumerable {
50
50
  enum class FlashMode(val value: String) : Enumerable {
51
51
  AUTO("auto"),
52
52
  ON("on"),
53
- OFF("off");
53
+ OFF("off"),
54
+ SCREEN("screen");
54
55
 
55
56
  fun mapToLens() = when (this) {
56
57
  AUTO -> ImageCapture.FLASH_MODE_AUTO
57
58
  OFF -> ImageCapture.FLASH_MODE_OFF
58
59
  ON -> ImageCapture.FLASH_MODE_ON
60
+ SCREEN -> ImageCapture.FLASH_MODE_SCREEN
59
61
  }
60
62
  }
61
63
 
@@ -69,6 +71,15 @@ enum class FocusMode(val value: String) : Enumerable {
69
71
  OFF("off")
70
72
  }
71
73
 
74
+ enum class VideoStabilizationMode(val value: String) : Enumerable {
75
+ OFF("off"),
76
+ STANDARD("standard"),
77
+ CINEMATIC("cinematic"),
78
+ AUTO("auto");
79
+
80
+ fun isEnabled() = this != OFF
81
+ }
82
+
72
83
  data class BarcodeSettings(
73
84
  @Field val barcodeTypes: List<BarcodeType>
74
85
  ) : Record
@@ -4,7 +4,16 @@ import type { ViewProps } from 'react-native';
4
4
  import { AndroidBarcode } from './AndroidBarcode.types';
5
5
  import { PictureRef } from './PictureRef';
6
6
  export type CameraType = 'front' | 'back';
7
- export type FlashMode = 'off' | 'on' | 'auto';
7
+ /**
8
+ * Flash mode for the camera.
9
+ * - `off` - Flash is disabled.
10
+ * - `on` - Flash will fire for every capture.
11
+ * - `auto` - Flash will fire automatically when required.
12
+ * - `screen` - Uses the device screen as a flash for front camera selfies.
13
+ * On Android, this uses CameraX's dedicated screen flash mode.
14
+ * On iOS, this maps to 'on' which triggers Retina Flash automatically.
15
+ */
16
+ export type FlashMode = 'off' | 'on' | 'auto' | 'screen';
8
17
  export type ImageType = 'png' | 'jpg';
9
18
  export type CameraMode = 'picture' | 'video';
10
19
  export type CameraRatio = '4:3' | '16:9' | '1:1';
@@ -22,7 +31,13 @@ export type FocusMode = 'on' | 'off';
22
31
  export type VideoCodec = 'avc1' | 'hvc1' | 'jpeg' | 'apcn' | 'ap4h';
23
32
  /**
24
33
  * This option specifies the stabilization mode to use when recording a video.
25
- * @platform ios
34
+ * - `off` - No stabilization.
35
+ * - `standard` - Standard stabilization.
36
+ * - `cinematic` - Cinematic stabilization (provides more aggressive stabilization).
37
+ * - `auto` - The system automatically chooses the best stabilization mode.
38
+ *
39
+ * On Android, `standard`, `cinematic`, and `auto` all enable video stabilization,
40
+ * while `off` disables it. The specific stabilization method is determined by the device.
26
41
  */
27
42
  export type VideoStabilization = 'off' | 'standard' | 'cinematic' | 'auto';
28
43
  export type VideoQuality = '2160p' | '1080p' | '720p' | '480p' | '4:3';
@@ -377,7 +392,7 @@ export type CameraViewProps = ViewProps & {
377
392
  /**
378
393
  * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).
379
394
  * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).
380
- * @platform ios
395
+ * @default 'auto'
381
396
  */
382
397
  videoStabilizationMode?: VideoStabilization;
383
398
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Camera.types.d.ts","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],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,OAAO,EAEL,gBAAgB,GAKjB,MAAM,mBAAmB,CAAC;AA2jB3B,OAAO,EAEL,gBAAgB,GAIjB,CAAC","sourcesContent":["import {\n PermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n EventSubscription,\n NativeModule,\n} from 'expo-modules-core';\nimport type { Ref } from 'react';\nimport type { ViewProps } from 'react-native';\n\nimport { AndroidBarcode } from './AndroidBarcode.types';\nimport { PictureRef } from './PictureRef';\n\nexport type CameraType = 'front' | 'back';\n\nexport type FlashMode = 'off' | 'on' | 'auto';\n\nexport type ImageType = 'png' | 'jpg';\n\nexport type CameraMode = 'picture' | 'video';\n\nexport type CameraRatio = '4:3' | '16:9' | '1:1';\n\n/**\n * This option specifies the mode of focus on the device.\n * - `on` - Indicates that the device should autofocus once and then lock the focus.\n * - `off` - Indicates that the device should automatically focus when needed.\n * @default off\n */\nexport type FocusMode = 'on' | 'off';\n\n/**\n * This option specifies what codec to use when recording a video.\n * @platform ios\n */\nexport type VideoCodec = 'avc1' | 'hvc1' | 'jpeg' | 'apcn' | 'ap4h';\n\n/**\n * This option specifies the stabilization mode to use when recording a video.\n * @platform ios\n */\nexport type VideoStabilization = 'off' | 'standard' | 'cinematic' | 'auto';\n\n// @docsMissing\nexport type VideoQuality = '2160p' | '1080p' | '720p' | '480p' | '4:3';\n\nexport type CameraOrientation =\n | 'portrait'\n | 'portraitUpsideDown'\n | 'landscapeLeft'\n | 'landscapeRight';\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type ImageSize = {\n width: number;\n height: number;\n};\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type WebCameraSettings = {\n autoFocus?: string;\n flashMode?: string;\n whiteBalance?: string;\n exposureCompensation?: number;\n colorTemperature?: number;\n iso?: number;\n brightness?: number;\n contrast?: number;\n saturation?: number;\n sharpness?: number;\n focusDistance?: number;\n zoom?: number;\n};\n\n// @needsAudit\nexport type CameraCapturedPicture = {\n /**\n * Captured image width.\n */\n width: number;\n /**\n * Captured image height.\n */\n height: number;\n /**\n * The format of the captured image.\n */\n format: 'jpg' | 'png';\n /**\n * On web, the value of `uri` is the same as `base64` because file system URLs are not supported in the browser.\n */\n uri: string;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n /**\n * On Android and iOS this object may include various fields based on the device and operating system.\n * On web, it is a partial representation of the [`MediaTrackSettings`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings) dictionary.\n */\n exif?: Partial<MediaTrackSettings> | any;\n};\n\n// @needsAudit\nexport type CameraPictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n * @default 1\n */\n quality?: number;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n /**\n * Whether to also include the EXIF data for the image.\n */\n exif?: boolean;\n /**\n * Additional EXIF data to be included for the image. Only useful when `exif` option is set to `true`.\n * @platform android\n * @platform ios\n */\n additionalExif?: Record<string, any>;\n /**\n * A callback invoked when picture is saved. If set, the promise of this method will resolve immediately with no data after picture is captured.\n * The data that it should contain will be passed to this callback. If displaying or processing a captured photo right after taking it\n * is not your case, this callback lets you skip waiting for it to be saved.\n * @param picture\n */\n onPictureSaved?: (picture: CameraCapturedPicture) => void;\n // TODO(Bacon): Is it possible to implement this in the browser?\n /**\n * If set to `true`, camera skips orientation adjustment and returns an image straight from the device's camera.\n * If enabled, `quality` option is discarded (processing pipeline is skipped as a whole).\n * Although enabling this option reduces image delivery time significantly, it may cause the image to appear in a wrong orientation\n * in the `Image` component (at the time of writing, it does not respect EXIF orientation of the images).\n * > **Note**: Enabling `skipProcessing` would cause orientation uncertainty. `Image` component does not respect EXIF\n * > stored orientation information, that means obtained image would be displayed wrongly (rotated by 90°, 180° or 270°).\n * > Different devices provide different orientations. For example some Sony Xperia or Samsung devices don't provide\n * > correctly oriented images by default. To always obtain correctly oriented image disable `skipProcessing` option.\n */\n skipProcessing?: boolean;\n /**\n * @platform web\n */\n scale?: number;\n /**\n * @platform web\n */\n imageType?: ImageType;\n /**\n * @platform web\n */\n isImageMirror?: boolean;\n /**\n * When set to `true`, the output image will be flipped along the vertical axis when using the front camera.\n * @default false\n * @platform ios\n * @platform android\n * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * @hidden\n */\n id?: number;\n /**\n * @hidden\n */\n fastMode?: boolean;\n /**\n * @hidden\n */\n maxDownsampling?: number;\n /**\n * To programmatically disable the camera shutter sound\n * @default true\n */\n shutterSound?: boolean;\n /**\n * Whether the camera should return an image ref that can be used directly in the `Image` component.\n */\n pictureRef?: boolean;\n};\n\n// @needsAudit\nexport type CameraRecordingOptions = {\n /**\n * Maximum video duration in seconds.\n */\n maxDuration?: number;\n /**\n * Maximum video file size in bytes.\n */\n maxFileSize?: number;\n /**\n * If `true`, the recorded video will be flipped along the vertical axis. iOS flips videos recorded with the front camera by default,\n * but you can reverse that back by setting this to `true`. On Android, this is handled in the user's device settings.\n * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * This option specifies what codec to use when recording the video. See [`VideoCodec`](#videocodec) for the possible values.\n * @platform ios\n */\n codec?: VideoCodec;\n};\n\n/**\n * @hidden\n */\nexport type PictureSavedListener = (event: {\n nativeEvent: { data: CameraCapturedPicture; id: number };\n}) => void;\n\n/**\n * @hidden\n */\nexport type AvailableLensesChangedListener = (event: { nativeEvent: AvailableLenses }) => void;\n\n// @docsMissing\nexport type AvailableLenses = { lenses: string[] };\n\n/**\n * @hidden\n */\nexport type CameraReadyListener = () => void;\n\n/**\n * @hidden\n */\nexport type ResponsiveOrientationChangedListener = (event: {\n nativeEvent: ResponsiveOrientationChanged;\n}) => void;\n\nexport type ResponsiveOrientationChanged = { orientation: CameraOrientation };\n\n/**\n * @hidden\n */\nexport type MountErrorListener = (event: { nativeEvent: CameraMountError }) => void;\n\n// @docsMissing\nexport type CameraMountError = { message: string };\n\n// @docsMissing\nexport type Point = {\n x: number;\n y: number;\n};\n\nexport type BarcodeSize = {\n /**\n * The height value.\n */\n height: number;\n /**\n * The width value.\n */\n width: number;\n};\n\n/**\n * These coordinates are represented in the coordinate space of the camera source (e.g. when you\n * are using the camera view, these values are adjusted to the dimensions of the view).\n */\nexport type BarcodePoint = Point;\n\nexport type BarcodeBounds = {\n /**\n * The origin point of the bounding box.\n */\n origin: BarcodePoint;\n /**\n * The size of the bounding box.\n */\n size: BarcodeSize;\n};\n\n// @needsAudit\nexport type BarcodeScanningResult = {\n /**\n * The barcode type.\n */\n type: string;\n /**\n * The parsed information encoded in the barcode.\n */\n data: string;\n /**\n * The raw information encoded in the barcode.\n * May be different from `data` depending on the barcode type.\n * @platform android\n * @hidden\n */\n raw?: string;\n /**\n * Corner points of the bounding box.\n * `cornerPoints` is not always available and may be empty. On iOS, for `code39` and `pdf417`\n * you don't get this value.\n *\n * **Note:** Corner points order is currently different across platforms. On Android,\n * [Google MLKit's native order](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode#getCornerPoints())\n * is used, which is `topLeft`, `topRight`, `bottomRight`, `bottomLeft`.\n * On iOS, the order is `bottomLeft`, `bottomRight`, `topLeft`, `topRight`. On Web, the order is\n * `topLeft`, `bottomLeft`, `topRight`, `bottomRight`.\n *\n */\n cornerPoints: BarcodePoint[];\n /**\n * The [`BarcodeBounds`](#barcodebounds) object.\n * `bounds` in some case will be representing an empty rectangle.\n * Moreover, `bounds` doesn't have to bound the whole barcode.\n * For some types, they will represent the area used by the scanner.\n */\n bounds: BarcodeBounds;\n\n /**\n * Extra information returned by the specific type of barcode.\n * @platform android\n */\n extra?: AndroidBarcode;\n};\n\nexport type ScanningResult = Omit<BarcodeScanningResult, 'bounds' | 'cornerPoints'>;\n\n// @needsAudit\nexport type CameraViewProps = ViewProps & {\n /**\n * Camera facing. Use one of `CameraType`. When `front`, use the front-facing camera.\n * When `back`, use the back-facing camera.\n * @default 'back'\n */\n facing?: CameraType;\n /**\n * Camera flash mode. Use one of `FlashMode` values. When `on`, the flash on your device will\n * turn on when taking a picture. When `off`, it won't. Setting it to `auto` will fire flash if required.\n * @default 'off'\n */\n flash?: FlashMode;\n /**\n * A value between `0` and `1` being a percentage of device's max zoom, where `0` means not zoomed and `1` means maximum zoom.\n * @default 0\n */\n zoom?: number;\n /**\n * Used to select image or video output.\n * @default 'picture'\n */\n mode?: CameraMode;\n /**\n * If present, video will be recorded with no sound.\n * @default false\n */\n mute?: boolean;\n /**\n * A boolean that determines whether the camera should mirror the image when using the front camera.\n * @default false\n */\n mirror?: boolean;\n /**\n * Indicates the focus mode to use.\n * @default off\n * @platform ios\n */\n autofocus?: FocusMode;\n /**\n * A boolean that determines whether the camera should be active.\n * Useful in situations where the camera may not have unmounted but you still want to stop the camera session.\n * @default true\n * @platform ios\n */\n active?: boolean;\n /**\n * Specify the quality of the recorded video. Use one of `VideoQuality` possible values:\n * for 16:9 resolution `2160p`, `1080p`, `720p`, `480p` : `Android only` and for 4:3 `4:3` (the size is 640x480).\n * If the chosen quality is not available for a device, the highest available is chosen.\n */\n videoQuality?: VideoQuality;\n /**\n * The bitrate of the video recording in bits per second.\n * Note: On iOS, you must specify the video codec when calling `recordAsync` to use this option.\n * @example 10_000_000\n */\n videoBitrate?: number;\n /**\n * A boolean that determines whether the camera shutter animation should be enabled.\n * @default true\n */\n animateShutter?: boolean;\n /**\n * A string representing the size of pictures [`takePictureAsync`](#takepictureasyncoptions) will take.\n * Available sizes can be fetched with [`getAvailablePictureSizesAsync`](#getavailablepicturesizesasync).\n * Setting this prop will cause the `ratio` prop to be ignored as the aspect ratio is determined by the selected size.\n */\n pictureSize?: string;\n /**\n * Available lenses are emitted to the `onAvailableLensesChanged` callback whenever the currently selected camera changes or by calling [`getAvailableLensesAsync`](#getavailablelensesasync).\n * You can read more about the available lenses in the [Apple documentation](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct).\n * @platform ios\n * @default 'builtInWideAngleCamera'\n */\n selectedLens?: string;\n /**\n * A boolean to enable or disable the torch.\n * @default false\n */\n enableTorch?: boolean;\n /**\n * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).\n * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).\n * @platform ios\n */\n videoStabilizationMode?: VideoStabilization;\n /**\n * @example\n * ```tsx\n * <CameraView\n * barcodeScannerSettings={{\n * barcodeTypes: [\"qr\"],\n * }}\n * />\n * ```\n */\n barcodeScannerSettings?: BarcodeSettings;\n /**\n * A URL for an image to be shown while the camera is loading.\n * @platform web\n */\n poster?: string;\n /**\n * Whether to allow responsive orientation of the camera when the screen orientation is locked (that is, when set to `true`,\n * landscape photos will be taken if the device is turned that way, even if the app or device orientation is locked to portrait).\n * @platform ios\n */\n responsiveOrientationWhenOrientationLocked?: boolean;\n /**\n * A string representing the aspect ratio of the preview. For example, `4:3` and `16:9`.\n * Note: Setting the aspect ratio here will change the scaleType of the camera preview from `FILL` to `FIT`.\n * Also, when using 1:1, devices only support certain sizes. If you specify an unsupported size, the closest supported ratio will be used.\n * @platform android\n */\n ratio?: CameraRatio;\n /**\n * Callback invoked when camera preview has been set.\n */\n onCameraReady?: () => void;\n /**\n * Callback invoked when camera preview could not start.\n * @param event Error object that contains a `message`.\n */\n onMountError?: (event: CameraMountError) => void;\n /**\n * Callback that is invoked when a barcode has been successfully scanned. The callback is provided with\n * an object of the [`BarcodeScanningResult`](#barcodescanningresult) shape, where the `type`\n * refers to the barcode type that was scanned, and the `data` is the information encoded in the barcode\n * (in this case of QR codes, this is often a URL). See [`BarcodeType`](#barcodetype) for supported values.\n * @param scanningResult\n */\n onBarcodeScanned?: (scanningResult: BarcodeScanningResult) => void;\n /**\n * Callback invoked when responsive orientation changes. Only applicable if `responsiveOrientationWhenOrientationLocked` is `true`.\n * @param event result object that contains updated orientation of camera\n * @platform ios\n */\n onResponsiveOrientationChanged?: (event: ResponsiveOrientationChanged) => void;\n /**\n * Callback invoked when the cameras available lenses change.\n * @param event result object that contains a `lenses` property containing an array of available lenses.\n * @platform ios\n */\n onAvailableLensesChanged?: (event: AvailableLenses) => void;\n};\n\n/**\n * @hidden\n */\nexport interface CameraViewRef {\n readonly takePicture: (options: CameraPictureOptions) => Promise<CameraCapturedPicture>;\n readonly takePictureRef?: (options: CameraPictureOptions) => Promise<PictureRef>;\n readonly getAvailablePictureSizes: () => Promise<string[]>;\n readonly getAvailableLenses: () => Promise<string[]>;\n readonly record: (options?: CameraRecordingOptions) => Promise<{ uri: string }>;\n readonly toggleRecording: () => Promise<void>;\n readonly stopRecording: () => Promise<void>;\n readonly launchModernScanner: () => Promise<void>;\n readonly resumePreview: () => Promise<void>;\n readonly pausePreview: () => Promise<void>;\n}\n\n/**\n * @hidden\n */\nexport type CameraNativeProps = {\n pointerEvents?: any;\n style?: any;\n ref?: Ref<CameraViewRef>;\n onCameraReady?: CameraReadyListener;\n onMountError?: MountErrorListener;\n onBarcodeScanned?: (event: { nativeEvent: BarcodeScanningResult }) => void;\n onPictureSaved?: PictureSavedListener;\n onResponsiveOrientationChanged?: ResponsiveOrientationChangedListener;\n onAvailableLensesChanged?: AvailableLensesChangedListener;\n facing?: string;\n flashMode?: string;\n enableTorch?: boolean;\n animateShutter?: boolean;\n autoFocus?: FocusMode;\n mute?: boolean;\n zoom?: number;\n ratio?: CameraRatio;\n barcodeScannerSettings?: BarcodeSettings;\n barcodeScannerEnabled?: boolean;\n poster?: string;\n responsiveOrientationWhenOrientationLocked?: boolean;\n};\n\n// @docsMissing\nexport type BarcodeSettings = {\n barcodeTypes: BarcodeType[];\n};\n\n/**\n * @platform ios\n */\nexport type ScanningOptions = {\n /**\n * The type of codes to scan for.\n */\n barcodeTypes: BarcodeType[];\n /**\n * Indicates whether people can use a two-finger pinch-to-zoom gesture.\n * @platform ios\n * @default true\n */\n isPinchToZoomEnabled?: boolean;\n /**\n * Guidance text, such as “Slow Down,” appears over the live video.\n * @platform ios\n * @default true\n */\n isGuidanceEnabled?: boolean;\n /**\n * Indicates whether the scanner displays highlights around recognized items.\n * @platform ios\n * @default false\n */\n isHighlightingEnabled?: boolean;\n};\n\n/**\n * The available barcode types that can be scanned.\n */\nexport type BarcodeType =\n | 'aztec'\n | 'ean13'\n | 'ean8'\n | 'qr'\n | 'pdf417'\n | 'upc_e'\n | 'datamatrix'\n | 'code39'\n | 'code93'\n | 'itf14'\n | 'codabar'\n | 'code128'\n | 'upc_a';\n\nexport {\n PermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n EventSubscription as Subscription,\n};\n\nexport type PhotoResult = {\n /**\n * A URI to the modified image (usable as the source for an `Image` or `Video` element).\n */\n uri: string;\n /**\n * Width of the image.\n */\n width: number;\n /**\n * Height of the image.\n */\n height: number;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n};\n\n// @needsAudit\n/**\n * A map defining how modified image should be saved.\n */\nexport type SavePictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n */\n quality?: number;\n /**\n * Additional metadata to be included for the image.\n */\n metadata?: Record<string, any>;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n};\n\nexport type CameraEvents = {\n onModernBarcodeScanned: (event: ScanningResult) => void;\n};\nexport declare class CameraNativeModule extends NativeModule<CameraEvents> {\n /**\n * @hidden\n */\n Picture: typeof PictureRef;\n\n readonly isModernBarcodeScannerAvailable: boolean;\n readonly toggleRecordingAsyncAvailable: boolean;\n readonly isAvailableAsync: () => Promise<boolean>;\n readonly launchScanner: (options?: ScanningOptions) => Promise<void>;\n readonly dismissScanner: () => Promise<void>;\n readonly scanFromURLAsync: (\n url: string,\n barcodeTypes?: BarcodeType[]\n ) => Promise<BarcodeScanningResult[]>;\n readonly getCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly getMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly getAvailableVideoCodecsAsync: () => Promise<VideoCodec[]>;\n\n readonly Type: Record<keyof CameraType, CameraNativeProps['facing']>;\n readonly FlashMode: Record<keyof FlashMode, CameraNativeProps['flashMode']>;\n}\n"]}
1
+ {"version":3,"file":"Camera.types.js","sourceRoot":"","sources":["../src/Camera.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,GAKjB,MAAM,mBAAmB,CAAC;AA0kB3B,OAAO,EAEL,gBAAgB,GAIjB,CAAC","sourcesContent":["import {\n PermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n EventSubscription,\n NativeModule,\n} from 'expo-modules-core';\nimport type { Ref } from 'react';\nimport type { ViewProps } from 'react-native';\n\nimport { AndroidBarcode } from './AndroidBarcode.types';\nimport { PictureRef } from './PictureRef';\n\nexport type CameraType = 'front' | 'back';\n\n/**\n * Flash mode for the camera.\n * - `off` - Flash is disabled.\n * - `on` - Flash will fire for every capture.\n * - `auto` - Flash will fire automatically when required.\n * - `screen` - Uses the device screen as a flash for front camera selfies.\n * On Android, this uses CameraX's dedicated screen flash mode.\n * On iOS, this maps to 'on' which triggers Retina Flash automatically.\n */\nexport type FlashMode = 'off' | 'on' | 'auto' | 'screen';\n\nexport type ImageType = 'png' | 'jpg';\n\nexport type CameraMode = 'picture' | 'video';\n\nexport type CameraRatio = '4:3' | '16:9' | '1:1';\n\n/**\n * This option specifies the mode of focus on the device.\n * - `on` - Indicates that the device should autofocus once and then lock the focus.\n * - `off` - Indicates that the device should automatically focus when needed.\n * @default off\n */\nexport type FocusMode = 'on' | 'off';\n\n/**\n * This option specifies what codec to use when recording a video.\n * @platform ios\n */\nexport type VideoCodec = 'avc1' | 'hvc1' | 'jpeg' | 'apcn' | 'ap4h';\n\n/**\n * This option specifies the stabilization mode to use when recording a video.\n * - `off` - No stabilization.\n * - `standard` - Standard stabilization.\n * - `cinematic` - Cinematic stabilization (provides more aggressive stabilization).\n * - `auto` - The system automatically chooses the best stabilization mode.\n *\n * On Android, `standard`, `cinematic`, and `auto` all enable video stabilization,\n * while `off` disables it. The specific stabilization method is determined by the device.\n */\nexport type VideoStabilization = 'off' | 'standard' | 'cinematic' | 'auto';\n\n// @docsMissing\nexport type VideoQuality = '2160p' | '1080p' | '720p' | '480p' | '4:3';\n\nexport type CameraOrientation =\n | 'portrait'\n | 'portraitUpsideDown'\n | 'landscapeLeft'\n | 'landscapeRight';\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type ImageSize = {\n width: number;\n height: number;\n};\n\n// @docsMissing\n/**\n * @hidden We do not expose related web methods in docs.\n * @platform web\n */\nexport type WebCameraSettings = {\n autoFocus?: string;\n flashMode?: string;\n whiteBalance?: string;\n exposureCompensation?: number;\n colorTemperature?: number;\n iso?: number;\n brightness?: number;\n contrast?: number;\n saturation?: number;\n sharpness?: number;\n focusDistance?: number;\n zoom?: number;\n};\n\n// @needsAudit\nexport type CameraCapturedPicture = {\n /**\n * Captured image width.\n */\n width: number;\n /**\n * Captured image height.\n */\n height: number;\n /**\n * The format of the captured image.\n */\n format: 'jpg' | 'png';\n /**\n * On web, the value of `uri` is the same as `base64` because file system URLs are not supported in the browser.\n */\n uri: string;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n /**\n * On Android and iOS this object may include various fields based on the device and operating system.\n * On web, it is a partial representation of the [`MediaTrackSettings`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings) dictionary.\n */\n exif?: Partial<MediaTrackSettings> | any;\n};\n\n// @needsAudit\nexport type CameraPictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n * @default 1\n */\n quality?: number;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n /**\n * Whether to also include the EXIF data for the image.\n */\n exif?: boolean;\n /**\n * Additional EXIF data to be included for the image. Only useful when `exif` option is set to `true`.\n * @platform android\n * @platform ios\n */\n additionalExif?: Record<string, any>;\n /**\n * A callback invoked when picture is saved. If set, the promise of this method will resolve immediately with no data after picture is captured.\n * The data that it should contain will be passed to this callback. If displaying or processing a captured photo right after taking it\n * is not your case, this callback lets you skip waiting for it to be saved.\n * @param picture\n */\n onPictureSaved?: (picture: CameraCapturedPicture) => void;\n // TODO(Bacon): Is it possible to implement this in the browser?\n /**\n * If set to `true`, camera skips orientation adjustment and returns an image straight from the device's camera.\n * If enabled, `quality` option is discarded (processing pipeline is skipped as a whole).\n * Although enabling this option reduces image delivery time significantly, it may cause the image to appear in a wrong orientation\n * in the `Image` component (at the time of writing, it does not respect EXIF orientation of the images).\n * > **Note**: Enabling `skipProcessing` would cause orientation uncertainty. `Image` component does not respect EXIF\n * > stored orientation information, that means obtained image would be displayed wrongly (rotated by 90°, 180° or 270°).\n * > Different devices provide different orientations. For example some Sony Xperia or Samsung devices don't provide\n * > correctly oriented images by default. To always obtain correctly oriented image disable `skipProcessing` option.\n */\n skipProcessing?: boolean;\n /**\n * @platform web\n */\n scale?: number;\n /**\n * @platform web\n */\n imageType?: ImageType;\n /**\n * @platform web\n */\n isImageMirror?: boolean;\n /**\n * When set to `true`, the output image will be flipped along the vertical axis when using the front camera.\n * @default false\n * @platform ios\n * @platform android\n * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * @hidden\n */\n id?: number;\n /**\n * @hidden\n */\n fastMode?: boolean;\n /**\n * @hidden\n */\n maxDownsampling?: number;\n /**\n * To programmatically disable the camera shutter sound\n * @default true\n */\n shutterSound?: boolean;\n /**\n * Whether the camera should return an image ref that can be used directly in the `Image` component.\n */\n pictureRef?: boolean;\n};\n\n// @needsAudit\nexport type CameraRecordingOptions = {\n /**\n * Maximum video duration in seconds.\n */\n maxDuration?: number;\n /**\n * Maximum video file size in bytes.\n */\n maxFileSize?: number;\n /**\n * If `true`, the recorded video will be flipped along the vertical axis. iOS flips videos recorded with the front camera by default,\n * but you can reverse that back by setting this to `true`. On Android, this is handled in the user's device settings.\n * @deprecated Use `mirror` prop on `CameraView` instead.\n */\n mirror?: boolean;\n /**\n * This option specifies what codec to use when recording the video. See [`VideoCodec`](#videocodec) for the possible values.\n * @platform ios\n */\n codec?: VideoCodec;\n};\n\n/**\n * @hidden\n */\nexport type PictureSavedListener = (event: {\n nativeEvent: { data: CameraCapturedPicture; id: number };\n}) => void;\n\n/**\n * @hidden\n */\nexport type AvailableLensesChangedListener = (event: { nativeEvent: AvailableLenses }) => void;\n\n// @docsMissing\nexport type AvailableLenses = { lenses: string[] };\n\n/**\n * @hidden\n */\nexport type CameraReadyListener = () => void;\n\n/**\n * @hidden\n */\nexport type ResponsiveOrientationChangedListener = (event: {\n nativeEvent: ResponsiveOrientationChanged;\n}) => void;\n\nexport type ResponsiveOrientationChanged = { orientation: CameraOrientation };\n\n/**\n * @hidden\n */\nexport type MountErrorListener = (event: { nativeEvent: CameraMountError }) => void;\n\n// @docsMissing\nexport type CameraMountError = { message: string };\n\n// @docsMissing\nexport type Point = {\n x: number;\n y: number;\n};\n\nexport type BarcodeSize = {\n /**\n * The height value.\n */\n height: number;\n /**\n * The width value.\n */\n width: number;\n};\n\n/**\n * These coordinates are represented in the coordinate space of the camera source (e.g. when you\n * are using the camera view, these values are adjusted to the dimensions of the view).\n */\nexport type BarcodePoint = Point;\n\nexport type BarcodeBounds = {\n /**\n * The origin point of the bounding box.\n */\n origin: BarcodePoint;\n /**\n * The size of the bounding box.\n */\n size: BarcodeSize;\n};\n\n// @needsAudit\nexport type BarcodeScanningResult = {\n /**\n * The barcode type.\n */\n type: string;\n /**\n * The parsed information encoded in the barcode.\n */\n data: string;\n /**\n * The raw information encoded in the barcode.\n * May be different from `data` depending on the barcode type.\n * @platform android\n * @hidden\n */\n raw?: string;\n /**\n * Corner points of the bounding box.\n * `cornerPoints` is not always available and may be empty. On iOS, for `code39` and `pdf417`\n * you don't get this value.\n *\n * **Note:** Corner points order is currently different across platforms. On Android,\n * [Google MLKit's native order](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode#getCornerPoints())\n * is used, which is `topLeft`, `topRight`, `bottomRight`, `bottomLeft`.\n * On iOS, the order is `bottomLeft`, `bottomRight`, `topLeft`, `topRight`. On Web, the order is\n * `topLeft`, `bottomLeft`, `topRight`, `bottomRight`.\n *\n */\n cornerPoints: BarcodePoint[];\n /**\n * The [`BarcodeBounds`](#barcodebounds) object.\n * `bounds` in some case will be representing an empty rectangle.\n * Moreover, `bounds` doesn't have to bound the whole barcode.\n * For some types, they will represent the area used by the scanner.\n */\n bounds: BarcodeBounds;\n\n /**\n * Extra information returned by the specific type of barcode.\n * @platform android\n */\n extra?: AndroidBarcode;\n};\n\nexport type ScanningResult = Omit<BarcodeScanningResult, 'bounds' | 'cornerPoints'>;\n\n// @needsAudit\nexport type CameraViewProps = ViewProps & {\n /**\n * Camera facing. Use one of `CameraType`. When `front`, use the front-facing camera.\n * When `back`, use the back-facing camera.\n * @default 'back'\n */\n facing?: CameraType;\n /**\n * Camera flash mode. Use one of `FlashMode` values. When `on`, the flash on your device will\n * turn on when taking a picture. When `off`, it won't. Setting it to `auto` will fire flash if required.\n * @default 'off'\n */\n flash?: FlashMode;\n /**\n * A value between `0` and `1` being a percentage of device's max zoom, where `0` means not zoomed and `1` means maximum zoom.\n * @default 0\n */\n zoom?: number;\n /**\n * Used to select image or video output.\n * @default 'picture'\n */\n mode?: CameraMode;\n /**\n * If present, video will be recorded with no sound.\n * @default false\n */\n mute?: boolean;\n /**\n * A boolean that determines whether the camera should mirror the image when using the front camera.\n * @default false\n */\n mirror?: boolean;\n /**\n * Indicates the focus mode to use.\n * @default off\n * @platform ios\n */\n autofocus?: FocusMode;\n /**\n * A boolean that determines whether the camera should be active.\n * Useful in situations where the camera may not have unmounted but you still want to stop the camera session.\n * @default true\n * @platform ios\n */\n active?: boolean;\n /**\n * Specify the quality of the recorded video. Use one of `VideoQuality` possible values:\n * for 16:9 resolution `2160p`, `1080p`, `720p`, `480p` : `Android only` and for 4:3 `4:3` (the size is 640x480).\n * If the chosen quality is not available for a device, the highest available is chosen.\n */\n videoQuality?: VideoQuality;\n /**\n * The bitrate of the video recording in bits per second.\n * Note: On iOS, you must specify the video codec when calling `recordAsync` to use this option.\n * @example 10_000_000\n */\n videoBitrate?: number;\n /**\n * A boolean that determines whether the camera shutter animation should be enabled.\n * @default true\n */\n animateShutter?: boolean;\n /**\n * A string representing the size of pictures [`takePictureAsync`](#takepictureasyncoptions) will take.\n * Available sizes can be fetched with [`getAvailablePictureSizesAsync`](#getavailablepicturesizesasync).\n * Setting this prop will cause the `ratio` prop to be ignored as the aspect ratio is determined by the selected size.\n */\n pictureSize?: string;\n /**\n * Available lenses are emitted to the `onAvailableLensesChanged` callback whenever the currently selected camera changes or by calling [`getAvailableLensesAsync`](#getavailablelensesasync).\n * You can read more about the available lenses in the [Apple documentation](https://developer.apple.com/documentation/avfoundation/avcapturedevice/devicetype-swift.struct).\n * @platform ios\n * @default 'builtInWideAngleCamera'\n */\n selectedLens?: string;\n /**\n * A boolean to enable or disable the torch.\n * @default false\n */\n enableTorch?: boolean;\n /**\n * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).\n * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).\n * @default 'auto'\n */\n videoStabilizationMode?: VideoStabilization;\n /**\n * @example\n * ```tsx\n * <CameraView\n * barcodeScannerSettings={{\n * barcodeTypes: [\"qr\"],\n * }}\n * />\n * ```\n */\n barcodeScannerSettings?: BarcodeSettings;\n /**\n * A URL for an image to be shown while the camera is loading.\n * @platform web\n */\n poster?: string;\n /**\n * Whether to allow responsive orientation of the camera when the screen orientation is locked (that is, when set to `true`,\n * landscape photos will be taken if the device is turned that way, even if the app or device orientation is locked to portrait).\n * @platform ios\n */\n responsiveOrientationWhenOrientationLocked?: boolean;\n /**\n * A string representing the aspect ratio of the preview. For example, `4:3` and `16:9`.\n * Note: Setting the aspect ratio here will change the scaleType of the camera preview from `FILL` to `FIT`.\n * Also, when using 1:1, devices only support certain sizes. If you specify an unsupported size, the closest supported ratio will be used.\n * @platform android\n */\n ratio?: CameraRatio;\n /**\n * Callback invoked when camera preview has been set.\n */\n onCameraReady?: () => void;\n /**\n * Callback invoked when camera preview could not start.\n * @param event Error object that contains a `message`.\n */\n onMountError?: (event: CameraMountError) => void;\n /**\n * Callback that is invoked when a barcode has been successfully scanned. The callback is provided with\n * an object of the [`BarcodeScanningResult`](#barcodescanningresult) shape, where the `type`\n * refers to the barcode type that was scanned, and the `data` is the information encoded in the barcode\n * (in this case of QR codes, this is often a URL). See [`BarcodeType`](#barcodetype) for supported values.\n * @param scanningResult\n */\n onBarcodeScanned?: (scanningResult: BarcodeScanningResult) => void;\n /**\n * Callback invoked when responsive orientation changes. Only applicable if `responsiveOrientationWhenOrientationLocked` is `true`.\n * @param event result object that contains updated orientation of camera\n * @platform ios\n */\n onResponsiveOrientationChanged?: (event: ResponsiveOrientationChanged) => void;\n /**\n * Callback invoked when the cameras available lenses change.\n * @param event result object that contains a `lenses` property containing an array of available lenses.\n * @platform ios\n */\n onAvailableLensesChanged?: (event: AvailableLenses) => void;\n};\n\n/**\n * @hidden\n */\nexport interface CameraViewRef {\n readonly takePicture: (options: CameraPictureOptions) => Promise<CameraCapturedPicture>;\n readonly takePictureRef?: (options: CameraPictureOptions) => Promise<PictureRef>;\n readonly getAvailablePictureSizes: () => Promise<string[]>;\n readonly getAvailableLenses: () => Promise<string[]>;\n readonly record: (options?: CameraRecordingOptions) => Promise<{ uri: string }>;\n readonly toggleRecording: () => Promise<void>;\n readonly stopRecording: () => Promise<void>;\n readonly launchModernScanner: () => Promise<void>;\n readonly resumePreview: () => Promise<void>;\n readonly pausePreview: () => Promise<void>;\n}\n\n/**\n * @hidden\n */\nexport type CameraNativeProps = {\n pointerEvents?: any;\n style?: any;\n ref?: Ref<CameraViewRef>;\n onCameraReady?: CameraReadyListener;\n onMountError?: MountErrorListener;\n onBarcodeScanned?: (event: { nativeEvent: BarcodeScanningResult }) => void;\n onPictureSaved?: PictureSavedListener;\n onResponsiveOrientationChanged?: ResponsiveOrientationChangedListener;\n onAvailableLensesChanged?: AvailableLensesChangedListener;\n facing?: string;\n flashMode?: string;\n enableTorch?: boolean;\n animateShutter?: boolean;\n autoFocus?: FocusMode;\n mute?: boolean;\n zoom?: number;\n ratio?: CameraRatio;\n barcodeScannerSettings?: BarcodeSettings;\n barcodeScannerEnabled?: boolean;\n poster?: string;\n responsiveOrientationWhenOrientationLocked?: boolean;\n};\n\n// @docsMissing\nexport type BarcodeSettings = {\n barcodeTypes: BarcodeType[];\n};\n\n/**\n * @platform ios\n */\nexport type ScanningOptions = {\n /**\n * The type of codes to scan for.\n */\n barcodeTypes: BarcodeType[];\n /**\n * Indicates whether people can use a two-finger pinch-to-zoom gesture.\n * @platform ios\n * @default true\n */\n isPinchToZoomEnabled?: boolean;\n /**\n * Guidance text, such as “Slow Down,” appears over the live video.\n * @platform ios\n * @default true\n */\n isGuidanceEnabled?: boolean;\n /**\n * Indicates whether the scanner displays highlights around recognized items.\n * @platform ios\n * @default false\n */\n isHighlightingEnabled?: boolean;\n};\n\n/**\n * The available barcode types that can be scanned.\n */\nexport type BarcodeType =\n | 'aztec'\n | 'ean13'\n | 'ean8'\n | 'qr'\n | 'pdf417'\n | 'upc_e'\n | 'datamatrix'\n | 'code39'\n | 'code93'\n | 'itf14'\n | 'codabar'\n | 'code128'\n | 'upc_a';\n\nexport {\n PermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n EventSubscription as Subscription,\n};\n\nexport type PhotoResult = {\n /**\n * A URI to the modified image (usable as the source for an `Image` or `Video` element).\n */\n uri: string;\n /**\n * Width of the image.\n */\n width: number;\n /**\n * Height of the image.\n */\n height: number;\n /**\n * A Base64 representation of the image.\n */\n base64?: string;\n};\n\n// @needsAudit\n/**\n * A map defining how modified image should be saved.\n */\nexport type SavePictureOptions = {\n /**\n * Specify the compression quality from `0` to `1`. `0` means compress for small size, and `1` means compress for maximum quality.\n */\n quality?: number;\n /**\n * Additional metadata to be included for the image.\n */\n metadata?: Record<string, any>;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n};\n\nexport type CameraEvents = {\n onModernBarcodeScanned: (event: ScanningResult) => void;\n};\nexport declare class CameraNativeModule extends NativeModule<CameraEvents> {\n /**\n * @hidden\n */\n Picture: typeof PictureRef;\n\n readonly isModernBarcodeScannerAvailable: boolean;\n readonly toggleRecordingAsyncAvailable: boolean;\n readonly isAvailableAsync: () => Promise<boolean>;\n readonly launchScanner: (options?: ScanningOptions) => Promise<void>;\n readonly dismissScanner: () => Promise<void>;\n readonly scanFromURLAsync: (\n url: string,\n barcodeTypes?: BarcodeType[]\n ) => Promise<BarcodeScanningResult[]>;\n readonly getCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestCameraPermissionsAsync: () => Promise<PermissionResponse>;\n readonly getMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly requestMicrophonePermissionsAsync: () => Promise<PermissionResponse>;\n readonly getAvailableVideoCodecsAsync: () => Promise<VideoCodec[]>;\n\n readonly Type: Record<keyof CameraType, CameraNativeProps['facing']>;\n readonly FlashMode: Record<keyof FlashMode, CameraNativeProps['flashMode']>;\n}\n"]}
@@ -10,6 +10,7 @@ declare const _default: {
10
10
  off: string;
11
11
  auto: string;
12
12
  torch: string;
13
+ screen: string;
13
14
  };
14
15
  readonly AutoFocus: {
15
16
  on: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoCameraManager.web.d.ts","sourceRoot":"","sources":["../src/ExpoCameraManager.web.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAEnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;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O,CAAC,kBAAkB,CAAC;yCAGvB,OAAO,CAAC,kBAAkB,CAAC;;AA5FxE,wBA2GE"}
@@ -128,6 +128,7 @@ export default {
128
128
  off: 'off',
129
129
  auto: 'auto',
130
130
  torch: 'torch',
131
+ screen: 'on',
131
132
  };
132
133
  },
133
134
  get AutoFocus() {
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoCameraManager.web.js","sourceRoot":"","sources":["../src/ExpoCameraManager.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAIL,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AAEnC,SAAS,YAAY,CAAC,WAAmC;IACvD,IAAI,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QAClE,OAAO,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAC1D,CAAC;IAED,iFAAiF;IACjF,+DAA+D;IAC/D,oEAAoE;IAEpE,yDAAyD;IACzD,MAAM,YAAY;IAChB,yHAAyH;IACzH,SAAS,CAAC,YAAY;QACtB,SAAS,CAAC,kBAAkB;QAC5B,SAAS,CAAC,eAAe;QACzB;YACE,MAAM,KAAK,GAAQ,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YACzD,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,GAAG,iBAAiB,CAAC;YAC/B,MAAM,KAAK,CAAC;QACd,CAAC,CAAC;IACJ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,6DAA6D;QAC7D,wCAAwC;QACxC,6EAA6E;QAC7E,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC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,CAAC,wBAAwB,CAAC,KAAa,EAAE,MAAyB;QACrE,OAAO,MAAM,MAAM,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IACD;;;;;;;;;SASK;IACL,KAAK,CAAC,mBAAmB;QACvB,OAAO,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,KAAK,CAAC,uBAAuB;QAC3B,OAAO,6BAA6B,EAAE,CAAC;IACzC,CAAC;IACD,KAAK,CAAC,yBAAyB;QAC7B,OAAO,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IACD,KAAK,CAAC,6BAA6B;QACjC,OAAO,6BAA6B,EAAE,CAAC;IACzC,CAAC;IACD,KAAK,CAAC,6BAA6B;QACjC,OAAO,2BAA2B,CAAC,YAAY,CAAC,CAAC;IACnD,CAAC;IACD,KAAK,CAAC,iCAAiC;QACrC,IAAI,CAAC;YACH,MAAM,YAAY,CAAC;gBACjB,KAAK,EAAE,IAAI;aACZ,CAAC,CAAC;YACH,OAAO;gBACL,MAAM,EAAE,gBAAgB,CAAC,OAAO;gBAChC,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,IAAI;gBACjB,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,uBAAuB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport {\n CameraCapturedPicture,\n CameraPictureOptions,\n PermissionResponse,\n PermissionStatus,\n} from './Camera.types';\nimport { ExponentCameraRef } from './ExpoCamera.web';\nimport {\n canGetUserMedia,\n isBackCameraAvailableAsync,\n isFrontCameraAvailableAsync,\n} from './web/WebUserMediaManager';\n\nfunction getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream> {\n if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\n return navigator.mediaDevices.getUserMedia(constraints);\n }\n\n // Some browsers partially implement mediaDevices. We can't just assign an object\n // with getUserMedia as it would overwrite existing properties.\n // Here, we will just add the getUserMedia property if it's missing.\n\n // First get ahold of the legacy getUserMedia, if present\n const getUserMedia =\n // TODO: this method is deprecated, migrate to https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\n navigator.getUserMedia ||\n navigator.webkitGetUserMedia ||\n navigator.mozGetUserMedia ||\n function () {\n const error: any = new Error('Permission unimplemented');\n error.code = 0;\n error.name = 'NotAllowedError';\n throw error;\n };\n return new Promise((resolve, reject) => {\n // TODO(@kitten): The types indicates that this is incorrect.\n // Please check whether this is correct!\n // @ts-expect-error: The `successCallback` doesn't match a `resolve` function\n getUserMedia.call(navigator, constraints, resolve, reject);\n });\n}\n\nfunction handleGetUserMediaError({ message }: { message: string }): PermissionResponse {\n // name: NotAllowedError\n // code: 0\n if (message === 'Permission dismissed') {\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n } else {\n // TODO: Bacon: [OSX] The system could deny access to chrome.\n // TODO: Bacon: add: { status: 'unimplemented' }\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n}\n\nasync function handleRequestPermissionsAsync(): Promise<PermissionResponse> {\n try {\n const streams = await getUserMedia({\n video: true,\n });\n // We need to close the media stream returned by getUserMedia\n // to avoid using the camera since we won't use these streams now\n // https://developer.mozilla.org/fr/docs/Web/API/MediaDevices/getUserMedia\n streams.getTracks().forEach((track) => {\n track.stop();\n streams.removeTrack(track);\n });\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n } catch (error: any) {\n return handleGetUserMediaError(error.message);\n }\n}\n\nasync function handlePermissionsQueryAsync(\n query: 'camera' | 'microphone'\n): Promise<PermissionResponse> {\n if (!navigator?.permissions?.query) {\n throw new UnavailabilityError('expo-camera', 'navigator.permissions API is not available');\n }\n\n try {\n const { state } = await navigator.permissions.query({ name: query });\n switch (state) {\n case 'prompt':\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n case 'granted':\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n case 'denied':\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n } catch (e) {\n // Firefox doesn't support querying for the camera permission, so return undetermined status\n if (e instanceof TypeError) {\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n throw e;\n }\n}\n\nexport default {\n get Type() {\n return {\n back: 'back',\n front: 'front',\n };\n },\n get FlashMode() {\n return {\n on: 'on',\n off: 'off',\n auto: 'auto',\n torch: 'torch',\n };\n },\n get AutoFocus() {\n return {\n on: 'on',\n off: 'off',\n auto: 'auto',\n singleShot: 'singleShot',\n };\n },\n get WhiteBalance() {\n return {\n auto: 'auto',\n continuous: 'continuous',\n manual: 'manual',\n };\n },\n get VideoQuality() {\n return {};\n },\n get VideoStabilization() {\n return {};\n },\n async isAvailableAsync(): Promise<boolean> {\n return canGetUserMedia();\n },\n async takePicture(\n options: CameraPictureOptions,\n camera: ExponentCameraRef\n ): Promise<CameraCapturedPicture> {\n return await camera.takePicture(options);\n },\n async pausePreview(camera: ExponentCameraRef): Promise<void> {\n await camera.pausePreview();\n },\n async resumePreview(camera: ExponentCameraRef): Promise<void> {\n return await camera.resumePreview();\n },\n async getAvailableCameraTypesAsync(): Promise<string[]> {\n if (!canGetUserMedia() || !navigator.mediaDevices.enumerateDevices) return [];\n\n const devices = await navigator.mediaDevices.enumerateDevices();\n\n const types: (string | null)[] = await Promise.all([\n (await isFrontCameraAvailableAsync(devices)) && 'front',\n (await isBackCameraAvailableAsync()) && 'back',\n ]);\n\n return types.filter(Boolean) as string[];\n },\n async getAvailablePictureSizes(ratio: string, camera: ExponentCameraRef): Promise<string[]> {\n return await camera.getAvailablePictureSizes(ratio);\n },\n /*\n async record(\n options?: CameraRecordingOptions,\n camera: ExponentCameraRef\n ): Promise<{ uri: string }> {\n // TODO: Support on web\n },\n async stopRecording(camera: ExponentCameraRef): Promise<void> {\n // TODO: Support on web\n }, */\n async getPermissionsAsync(): Promise<PermissionResponse> {\n return handlePermissionsQueryAsync('camera');\n },\n async requestPermissionsAsync(): Promise<PermissionResponse> {\n return handleRequestPermissionsAsync();\n },\n async getCameraPermissionsAsync(): Promise<PermissionResponse> {\n return handlePermissionsQueryAsync('camera');\n },\n async requestCameraPermissionsAsync(): Promise<PermissionResponse> {\n return handleRequestPermissionsAsync();\n },\n async getMicrophonePermissionsAsync(): Promise<PermissionResponse> {\n return handlePermissionsQueryAsync('microphone');\n },\n async requestMicrophonePermissionsAsync(): Promise<PermissionResponse> {\n try {\n await getUserMedia({\n audio: true,\n });\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n } catch (error: any) {\n return handleGetUserMediaError(error.message);\n }\n },\n};\n"]}
1
+ {"version":3,"file":"ExpoCameraManager.web.js","sourceRoot":"","sources":["../src/ExpoCameraManager.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAIL,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AAEnC,SAAS,YAAY,CAAC,WAAmC;IACvD,IAAI,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QAClE,OAAO,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAC1D,CAAC;IAED,iFAAiF;IACjF,+DAA+D;IAC/D,oEAAoE;IAEpE,yDAAyD;IACzD,MAAM,YAAY;IAChB,yHAAyH;I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OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,uBAAuB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport {\n CameraCapturedPicture,\n CameraPictureOptions,\n PermissionResponse,\n PermissionStatus,\n} from './Camera.types';\nimport { ExponentCameraRef } from './ExpoCamera.web';\nimport {\n canGetUserMedia,\n isBackCameraAvailableAsync,\n isFrontCameraAvailableAsync,\n} from './web/WebUserMediaManager';\n\nfunction getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream> {\n if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {\n return navigator.mediaDevices.getUserMedia(constraints);\n }\n\n // Some browsers partially implement mediaDevices. We can't just assign an object\n // with getUserMedia as it would overwrite existing properties.\n // Here, we will just add the getUserMedia property if it's missing.\n\n // First get ahold of the legacy getUserMedia, if present\n const getUserMedia =\n // TODO: this method is deprecated, migrate to https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\n navigator.getUserMedia ||\n navigator.webkitGetUserMedia ||\n navigator.mozGetUserMedia ||\n function () {\n const error: any = new Error('Permission unimplemented');\n error.code = 0;\n error.name = 'NotAllowedError';\n throw error;\n };\n return new Promise((resolve, reject) => {\n // TODO(@kitten): The types indicates that this is incorrect.\n // Please check whether this is correct!\n // @ts-expect-error: The `successCallback` doesn't match a `resolve` function\n getUserMedia.call(navigator, constraints, resolve, reject);\n });\n}\n\nfunction handleGetUserMediaError({ message }: { message: string }): PermissionResponse {\n // name: NotAllowedError\n // code: 0\n if (message === 'Permission dismissed') {\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n } else {\n // TODO: Bacon: [OSX] The system could deny access to chrome.\n // TODO: Bacon: add: { status: 'unimplemented' }\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n}\n\nasync function handleRequestPermissionsAsync(): Promise<PermissionResponse> {\n try {\n const streams = await getUserMedia({\n video: true,\n });\n // We need to close the media stream returned by getUserMedia\n // to avoid using the camera since we won't use these streams now\n // https://developer.mozilla.org/fr/docs/Web/API/MediaDevices/getUserMedia\n streams.getTracks().forEach((track) => {\n track.stop();\n streams.removeTrack(track);\n });\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n } catch (error: any) {\n return handleGetUserMediaError(error.message);\n }\n}\n\nasync function handlePermissionsQueryAsync(\n query: 'camera' | 'microphone'\n): Promise<PermissionResponse> {\n if (!navigator?.permissions?.query) {\n throw new UnavailabilityError('expo-camera', 'navigator.permissions API is not available');\n }\n\n try {\n const { state } = await navigator.permissions.query({ name: query });\n switch (state) {\n case 'prompt':\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n case 'granted':\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n case 'denied':\n return {\n status: PermissionStatus.DENIED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n } catch (e) {\n // Firefox doesn't support querying for the camera permission, so return undetermined status\n if (e instanceof TypeError) {\n return {\n status: PermissionStatus.UNDETERMINED,\n expires: 'never',\n canAskAgain: true,\n granted: false,\n };\n }\n throw e;\n }\n}\n\nexport default {\n get Type() {\n return {\n back: 'back',\n front: 'front',\n };\n },\n get FlashMode() {\n return {\n on: 'on',\n off: 'off',\n auto: 'auto',\n torch: 'torch',\n screen: 'on',\n };\n },\n get AutoFocus() {\n return {\n on: 'on',\n off: 'off',\n auto: 'auto',\n singleShot: 'singleShot',\n };\n },\n get WhiteBalance() {\n return {\n auto: 'auto',\n continuous: 'continuous',\n manual: 'manual',\n };\n },\n get VideoQuality() {\n return {};\n },\n get VideoStabilization() {\n return {};\n },\n async isAvailableAsync(): Promise<boolean> {\n return canGetUserMedia();\n },\n async takePicture(\n options: CameraPictureOptions,\n camera: ExponentCameraRef\n ): Promise<CameraCapturedPicture> {\n return await camera.takePicture(options);\n },\n async pausePreview(camera: ExponentCameraRef): Promise<void> {\n await camera.pausePreview();\n },\n async resumePreview(camera: ExponentCameraRef): Promise<void> {\n return await camera.resumePreview();\n },\n async getAvailableCameraTypesAsync(): Promise<string[]> {\n if (!canGetUserMedia() || !navigator.mediaDevices.enumerateDevices) return [];\n\n const devices = await navigator.mediaDevices.enumerateDevices();\n\n const types: (string | null)[] = await Promise.all([\n (await isFrontCameraAvailableAsync(devices)) && 'front',\n (await isBackCameraAvailableAsync()) && 'back',\n ]);\n\n return types.filter(Boolean) as string[];\n },\n async getAvailablePictureSizes(ratio: string, camera: ExponentCameraRef): Promise<string[]> {\n return await camera.getAvailablePictureSizes(ratio);\n },\n /*\n async record(\n options?: CameraRecordingOptions,\n camera: ExponentCameraRef\n ): Promise<{ uri: string }> {\n // TODO: Support on web\n },\n async stopRecording(camera: ExponentCameraRef): Promise<void> {\n // TODO: Support on web\n }, */\n async getPermissionsAsync(): Promise<PermissionResponse> {\n return handlePermissionsQueryAsync('camera');\n },\n async requestPermissionsAsync(): Promise<PermissionResponse> {\n return handleRequestPermissionsAsync();\n },\n async getCameraPermissionsAsync(): Promise<PermissionResponse> {\n return handlePermissionsQueryAsync('camera');\n },\n async requestCameraPermissionsAsync(): Promise<PermissionResponse> {\n return handleRequestPermissionsAsync();\n },\n async getMicrophonePermissionsAsync(): Promise<PermissionResponse> {\n return handlePermissionsQueryAsync('microphone');\n },\n async requestMicrophonePermissionsAsync(): Promise<PermissionResponse> {\n try {\n await getUserMedia({\n audio: true,\n });\n return {\n status: PermissionStatus.GRANTED,\n expires: 'never',\n canAskAgain: true,\n granted: true,\n };\n } catch (error: any) {\n return handleGetUserMediaError(error.message);\n }\n },\n};\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.camera",
11
- "version": "17.1.0-canary-20251216-6e1f9a7",
11
+ "version": "17.1.0-canary-20251223-b83b31e",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -195,6 +195,16 @@ public final class CameraViewModule: Module, ScannerResultHandler {
195
195
  }
196
196
  }
197
197
 
198
+ Prop("videoStabilizationMode") { (view, mode: VideoStabilizationMode?) in
199
+ if let mode, view.videoStabilizationMode != mode {
200
+ view.videoStabilizationMode = mode
201
+ return
202
+ }
203
+ if mode == nil && view.videoStabilizationMode != .auto {
204
+ view.videoStabilizationMode = .auto
205
+ }
206
+ }
207
+
198
208
  Prop("autoFocus") { (view, focusMode: FocusMode?) in
199
209
  if let focusMode, view.autoFocus != focusMode.toAVCaptureFocusMode() {
200
210
  view.autoFocus = focusMode.toAVCaptureFocusMode()
@@ -306,12 +316,12 @@ public final class CameraViewModule: Module, ScannerResultHandler {
306
316
  }
307
317
 
308
318
  Class("Picture", PictureRef.self) {
309
- Property("width") { (image: PictureRef) -> Int in
310
- return image.ref.cgImage?.width ?? 0
319
+ Property("width") { (image: PictureRef) -> CGFloat in
320
+ return image.ref.size.width
311
321
  }
312
322
 
313
- Property("height") { (image: PictureRef) -> Int in
314
- return image.ref.cgImage?.height ?? 0
323
+ Property("height") { (image: PictureRef) -> CGFloat in
324
+ return image.ref.size.height
315
325
  }
316
326
 
317
327
  AsyncFunction("savePictureAsync") { (image: PictureRef, options: SavePictureOptions?) -> [String: Any?] in
@@ -249,8 +249,8 @@ struct ExpoCameraUtils {
249
249
  }
250
250
 
251
251
  result["url"] = fileUrl.absoluteString
252
- result["width"] = image.cgImage?.width ?? 0
253
- result["height"] = image.cgImage?.height ?? 0
252
+ result["width"] = image.size.width
253
+ result["height"] = image.size.height
254
254
  result["base64"] = options.base64 ? data.base64EncodedString() : nil
255
255
 
256
256
  do {
@@ -19,12 +19,13 @@ enum FlashMode: String, Enumerable {
19
19
  case off
20
20
  case on
21
21
  case auto
22
+ case screen
22
23
 
23
24
  func toDeviceFlashMode() -> AVCaptureDevice.FlashMode {
24
25
  switch self {
25
26
  case .off:
26
27
  return .off
27
- case .on:
28
+ case .on, .screen:
28
29
  return .on
29
30
  case .auto:
30
31
  return .auto
@@ -50,3 +51,23 @@ enum FocusMode: String, Enumerable {
50
51
  }
51
52
  }
52
53
  }
54
+
55
+ enum VideoStabilizationMode: String, Enumerable {
56
+ case off
57
+ case standard
58
+ case cinematic
59
+ case auto
60
+
61
+ func toAVCaptureVideoStabilizationMode() -> AVCaptureVideoStabilizationMode {
62
+ switch self {
63
+ case .off:
64
+ return .off
65
+ case .standard:
66
+ return .standard
67
+ case .cinematic:
68
+ return .cinematic
69
+ case .auto:
70
+ return .auto
71
+ }
72
+ }
73
+ }
@@ -42,6 +42,11 @@ class CameraPhotoCapture: NSObject, AVCapturePhotoCaptureDelegate {
42
42
  optionsCopy.pictureRef = false
43
43
 
44
44
  let result = try await takePicture(options: optionsCopy, photoOutput: photoOutput)
45
+
46
+ if optionsCopy.fastMode {
47
+ return [:]
48
+ }
49
+
45
50
  if let result = result as? [String: Any] {
46
51
  return result
47
52
  }
@@ -8,6 +8,7 @@ protocol CameraVideoRecordingDelegate: AnyObject {
8
8
  var mirror: Bool { get }
9
9
  var appContext: AppContext? { get }
10
10
  var videoBitrate: Int? { get }
11
+ var videoStabilizationMode: VideoStabilizationMode { get }
11
12
  }
12
13
 
13
14
  class CameraVideoRecording: NSObject, AVCaptureFileOutputRecordingDelegate {
@@ -28,7 +29,7 @@ class CameraVideoRecording: NSObject, AVCaptureFileOutputRecordingDelegate {
28
29
  }
29
30
 
30
31
  if let connection = videoFileOutput.connection(with: .video) {
31
- let orientation = delegate?.responsiveWhenOrientationLocked == true ?
32
+ let orientation = await delegate?.responsiveWhenOrientationLocked == true ?
32
33
  delegate?.physicalOrientation ?? .unknown : UIDevice.current.orientation
33
34
  connection.videoOrientation = ExpoCameraUtils.videoOrientation(for: orientation)
34
35
  await setVideoOptions(options: options, for: connection, videoFileOutput: videoFileOutput, promise: promise)
@@ -83,6 +84,11 @@ class CameraVideoRecording: NSObject, AVCaptureFileOutputRecordingDelegate {
83
84
  videoFileOutput.maxRecordedFileSize = Int64(maxFileSize)
84
85
  }
85
86
 
87
+ let avMode = (delegate?.videoStabilizationMode ?? .auto).toAVCaptureVideoStabilizationMode()
88
+ if connection.isVideoStabilizationSupported {
89
+ connection.preferredVideoStabilizationMode = avMode
90
+ }
91
+
86
92
  if let codec = options.codec {
87
93
  let codecType = codec.codecType()
88
94
  if videoFileOutput.availableVideoCodecTypes.contains(codecType) {
@@ -58,6 +58,7 @@ public class CameraView: ExpoView, EXAppLifecycleListener, EXCameraInterface, Ca
58
58
  }
59
59
 
60
60
  internal var videoBitrate: Int?
61
+ var videoStabilizationMode: VideoStabilizationMode = .auto
61
62
 
62
63
  var presetCamera = AVCaptureDevice.Position.back {
63
64
  didSet {
@@ -0,0 +1 @@
1
+ 58bf4460ccb2f9a78e0d77893614b1000d83877ff5df6d12ab4ee9419bd0e1f065792534babfce85950c1344cf6684d2238c1a6a2c730129fb7ea8cd2adfa5ef
@@ -0,0 +1 @@
1
+ 791b1899725703058debb80213df4730950b4f27923f6270dfe7ee6b7121155ac90499fd820c7f68061dfebbebb43236e0ff786ab16881504427fedc835ad64a
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.camera",
6
- "version": "17.1.0-canary-20251216-6e1f9a7",
6
+ "version": "17.1.0-canary-20251223-b83b31e",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -40,13 +40,13 @@
40
40
  ],
41
41
  "files": [
42
42
  {
43
- "name": "expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar",
44
- "url": "expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar",
45
- "size": 243059,
46
- "sha512": "34842c0f2474c5f526ee4c37ff51cf025add5aa30827b6c2be05ea1a1e7bce3260913e8b06bb5b26e829fc0a124ab5b48e99357fe3aa107bfe9f3b6cb6aed541",
47
- "sha256": "06b60462b45bd8b848c452431f3407429969f5fad5b2c9c412f88e227ace53b6",
48
- "sha1": "2518544d80080550e3401246b537b9d75df6ef03",
49
- "md5": "49d78a43c09d212a7ea7ac853d5249de"
43
+ "name": "expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar",
44
+ "url": "expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar",
45
+ "size": 247658,
46
+ "sha512": "791b1899725703058debb80213df4730950b4f27923f6270dfe7ee6b7121155ac90499fd820c7f68061dfebbebb43236e0ff786ab16881504427fedc835ad64a",
47
+ "sha256": "2a0478c6274ca26854f4c64ec671612fa0fb2536ac2c2814f6864e8d7fc6a10b",
48
+ "sha1": "f23c3982ecf56448305170acc3c50920e1b06edd",
49
+ "md5": "d7bd8358e38678b886d5d8079157967f"
50
50
  }
51
51
  ]
52
52
  },
@@ -146,13 +146,13 @@
146
146
  ],
147
147
  "files": [
148
148
  {
149
- "name": "expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar",
150
- "url": "expo.modules.camera-17.1.0-canary-20251216-6e1f9a7.aar",
151
- "size": 243059,
152
- "sha512": "34842c0f2474c5f526ee4c37ff51cf025add5aa30827b6c2be05ea1a1e7bce3260913e8b06bb5b26e829fc0a124ab5b48e99357fe3aa107bfe9f3b6cb6aed541",
153
- "sha256": "06b60462b45bd8b848c452431f3407429969f5fad5b2c9c412f88e227ace53b6",
154
- "sha1": "2518544d80080550e3401246b537b9d75df6ef03",
155
- "md5": "49d78a43c09d212a7ea7ac853d5249de"
149
+ "name": "expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar",
150
+ "url": "expo.modules.camera-17.1.0-canary-20251223-b83b31e.aar",
151
+ "size": 247658,
152
+ "sha512": "791b1899725703058debb80213df4730950b4f27923f6270dfe7ee6b7121155ac90499fd820c7f68061dfebbebb43236e0ff786ab16881504427fedc835ad64a",
153
+ "sha256": "2a0478c6274ca26854f4c64ec671612fa0fb2536ac2c2814f6864e8d7fc6a10b",
154
+ "sha1": "f23c3982ecf56448305170acc3c50920e1b06edd",
155
+ "md5": "d7bd8358e38678b886d5d8079157967f"
156
156
  }
157
157
  ]
158
158
  },
@@ -166,13 +166,13 @@
166
166
  },
167
167
  "files": [
168
168
  {
169
- "name": "expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar",
170
- "url": "expo.modules.camera-17.1.0-canary-20251216-6e1f9a7-sources.jar",
171
- "size": 28741,
172
- "sha512": "fbb84bc27ac0cd27cc2675627ce2065c98e46b8063ff1b2768798364e2642000549dc4b169600a132cd20b8b16c1b554931fbdd1ac773254244b27f2b5c7d0cf",
173
- "sha256": "88d428131a1429ac059e1411f55e2329e376706f09d0de81294c7e7332ff6ed5",
174
- "sha1": "df466ac1c494cb055928d05c38c75950627fbbd9",
175
- "md5": "32e55aa2c23ebb3d865ff153aaaded8d"
169
+ "name": "expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar",
170
+ "url": "expo.modules.camera-17.1.0-canary-20251223-b83b31e-sources.jar",
171
+ "size": 29110,
172
+ "sha512": "58bf4460ccb2f9a78e0d77893614b1000d83877ff5df6d12ab4ee9419bd0e1f065792534babfce85950c1344cf6684d2238c1a6a2c730129fb7ea8cd2adfa5ef",
173
+ "sha256": "1ec614f5b58b2abbb4bcddc6df0ba5be2502a0bccf440cf49de0f5dea372a0ab",
174
+ "sha1": "7bb43a2194736912c9b751e8dffe3c5d892b3ea4",
175
+ "md5": "488ab1090e405248d6c7551ed0e59e81"
176
176
  }
177
177
  ]
178
178
  }
@@ -0,0 +1 @@
1
+ 3711357faabf584d08059db7bd78823b342b558e169226152dc29ba0fcc2a9b0ba5340fdf8fe4421d2ea7c12b6662ca825c6990e221999bfb23cb2dd6750db7d
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.camera</artifactId>
12
- <version>17.1.0-canary-20251216-6e1f9a7</version>
12
+ <version>17.1.0-canary-20251223-b83b31e</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.camera</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ caa00ea126527e01bedaadcc9c60fbcafbba1d2bbe7fbd8beb56df138592b38271d03ab484ba26f5edf9da914e3545d2057b76b483dcae01afa14d7b430f73db
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.camera</artifactId>
5
5
  <versioning>
6
- <latest>17.1.0-canary-20251216-6e1f9a7</latest>
7
- <release>17.1.0-canary-20251216-6e1f9a7</release>
6
+ <latest>17.1.0-canary-20251223-b83b31e</latest>
7
+ <release>17.1.0-canary-20251223-b83b31e</release>
8
8
  <versions>
9
- <version>17.1.0-canary-20251216-6e1f9a7</version>
9
+ <version>17.1.0-canary-20251223-b83b31e</version>
10
10
  </versions>
11
- <lastUpdated>20251216074641</lastUpdated>
11
+ <lastUpdated>20251223153453</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- a0e4ebe14c917d6b2bb0565d949f92ac
1
+ 9639d1cf8867e49556708df3da9435d4
@@ -1 +1 @@
1
- ff029f680ed3d27a8858fe9f3fcf5af842a6343f
1
+ ebd8da6bc07c6680cb6321cdb1dd535c206f8504
@@ -1 +1 @@
1
- 9c290f01fd3b8be223c902843f40bfb525e0e9c11713b42b5223d5e18715f283
1
+ 17f6a444bca31efc0db9049621dfc2fc1911c2ebbbdf67a8291a6e5e17a5d98a
@@ -1 +1 @@
1
- afbcde7aa4f87f9055bcc4cb962f3f5473f2cf9ee1eff30de573276bdc0704a04f8507af4c28b6a66faf7e6980dbe58c318253493518f52c1367372070d6d065
1
+ 646db1d044bb51831748d6c3337a118078dd157eca479e06fd72e8b1aca825ebed304b96d769454fb5e5b0101ddbd709031f53f8f1ca831f6a192f39e66d0305
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-camera",
3
- "version": "17.1.0-canary-20251216-6e1f9a7",
3
+ "version": "17.1.0-canary-20251223-b83b31e",
4
4
  "description": "A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to the app's cache. Morever, the component is also capable of detecting faces and bar codes appearing on the preview.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -37,10 +37,10 @@
37
37
  "invariant": "^2.2.4"
38
38
  },
39
39
  "devDependencies": {
40
- "expo-module-scripts": "5.1.0-canary-20251216-6e1f9a7"
40
+ "expo-module-scripts": "5.1.0-canary-20251223-b83b31e"
41
41
  },
42
42
  "peerDependencies": {
43
- "expo": "55.0.0-canary-20251216-6e1f9a7",
43
+ "expo": "55.0.0-canary-20251223-b83b31e",
44
44
  "react": "*",
45
45
  "react-native": "*",
46
46
  "react-native-web": "*"
@@ -14,7 +14,16 @@ import { PictureRef } from './PictureRef';
14
14
 
15
15
  export type CameraType = 'front' | 'back';
16
16
 
17
- export type FlashMode = 'off' | 'on' | 'auto';
17
+ /**
18
+ * Flash mode for the camera.
19
+ * - `off` - Flash is disabled.
20
+ * - `on` - Flash will fire for every capture.
21
+ * - `auto` - Flash will fire automatically when required.
22
+ * - `screen` - Uses the device screen as a flash for front camera selfies.
23
+ * On Android, this uses CameraX's dedicated screen flash mode.
24
+ * On iOS, this maps to 'on' which triggers Retina Flash automatically.
25
+ */
26
+ export type FlashMode = 'off' | 'on' | 'auto' | 'screen';
18
27
 
19
28
  export type ImageType = 'png' | 'jpg';
20
29
 
@@ -38,7 +47,13 @@ export type VideoCodec = 'avc1' | 'hvc1' | 'jpeg' | 'apcn' | 'ap4h';
38
47
 
39
48
  /**
40
49
  * This option specifies the stabilization mode to use when recording a video.
41
- * @platform ios
50
+ * - `off` - No stabilization.
51
+ * - `standard` - Standard stabilization.
52
+ * - `cinematic` - Cinematic stabilization (provides more aggressive stabilization).
53
+ * - `auto` - The system automatically chooses the best stabilization mode.
54
+ *
55
+ * On Android, `standard`, `cinematic`, and `auto` all enable video stabilization,
56
+ * while `off` disables it. The specific stabilization method is determined by the device.
42
57
  */
43
58
  export type VideoStabilization = 'off' | 'standard' | 'cinematic' | 'auto';
44
59
 
@@ -419,7 +434,7 @@ export type CameraViewProps = ViewProps & {
419
434
  /**
420
435
  * The video stabilization mode used for a video recording. Use one of [`VideoStabilization.<value>`](#videostabilization).
421
436
  * You can read more about each stabilization type in [Apple Documentation](https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode).
422
- * @platform ios
437
+ * @default 'auto'
423
438
  */
424
439
  videoStabilizationMode?: VideoStabilization;
425
440
  /**
@@ -146,6 +146,7 @@ export default {
146
146
  off: 'off',
147
147
  auto: 'auto',
148
148
  torch: 'torch',
149
+ screen: 'on',
149
150
  };
150
151
  },
151
152
  get AutoFocus() {
@@ -1 +0,0 @@
1
- fbb84bc27ac0cd27cc2675627ce2065c98e46b8063ff1b2768798364e2642000549dc4b169600a132cd20b8b16c1b554931fbdd1ac773254244b27f2b5c7d0cf
@@ -1 +0,0 @@
1
- 34842c0f2474c5f526ee4c37ff51cf025add5aa30827b6c2be05ea1a1e7bce3260913e8b06bb5b26e829fc0a124ab5b48e99357fe3aa107bfe9f3b6cb6aed541
@@ -1 +0,0 @@
1
- bb0fb44e7d7ee38dca99ec03516f79b97a3e8efa4efb9f0c3bf9418535ee9af07c21c0e8669cfe75673d5671bbe4d3281b6d39a8012f0763c0d1ec02b81fa6d1
@@ -1 +0,0 @@
1
- 7a68f8a503785a148c5c3d8eaab6a55ddadcd7657ba55f413b5281a3599f0798f00a9b69398eb05944ad41639e3915f6db6d6f37ed1fbcb0326d140a047df2e4