@octane-xplat/camera 0.19.0 → 0.20.0

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 (84) hide show
  1. package/README.md +2 -132
  2. package/package.json +20 -25
  3. package/platforms/android/java/com/octanexplat/camera/CameraPreviewView.java +24 -0
  4. package/platforms/android/java/com/octanexplat/camera/CameraSessionBridge.java +153 -21
  5. package/platforms/ios/src/XplatSwitchingMovieWriter.swift +557 -0
  6. package/src/CameraView.android.tsrx +187 -154
  7. package/src/CameraView.ios.tsrx +124 -110
  8. package/src/CameraView.macos.tsrx +103 -96
  9. package/src/CameraView.tsrx +2 -0
  10. package/src/CameraView.web.tsrx +157 -146
  11. package/src/CameraView.windows.tsrx +134 -125
  12. package/src/camera-host.macos.ts +1059 -0
  13. package/src/camera-permission.mobile.ts +85 -81
  14. package/src/camera-permission.windows.ts +56 -53
  15. package/src/camera-session.ios.ts +89 -61
  16. package/src/camera-session.macos.ts +51 -49
  17. package/src/camera-session.windows.ts +113 -105
  18. package/src/host-movie.web.ts +257 -231
  19. package/src/index.ts +28 -26
  20. package/src/index.web.ts +27 -25
  21. package/src/layout-child.ts +86 -79
  22. package/src/layout-child.web.ts +54 -53
  23. package/src/layout-child.windows.ts +80 -74
  24. package/src/movie-metadata.web.ts +84 -81
  25. package/src/movie-storage.web.ts +142 -135
  26. package/src/movie-writer.ios.ts +170 -0
  27. package/src/photo-lifecycle.macos.ts +60 -0
  28. package/src/photo-sheet.macos.ts +505 -0
  29. package/src/preview-display.ios.ts +69 -0
  30. package/src/preview-pinch.ts +41 -0
  31. package/src/preview-tap.ts +22 -21
  32. package/src/props.ts +115 -93
  33. package/src/recording-haptics.ios.ts +39 -0
  34. package/src/recording-source.web.ts +159 -0
  35. package/src/session-backend.android.ts +552 -410
  36. package/src/session-backend.ios.ts +1500 -1148
  37. package/src/session-backend.linux.ts +886 -860
  38. package/src/session-backend.macos.ts +697 -679
  39. package/src/session-backend.ts +51 -49
  40. package/src/session-backend.web.ts +1181 -867
  41. package/src/session-backend.windows.ts +1540 -1467
  42. package/src/session-core.ts +925 -714
  43. package/src/session.ts +12 -12
  44. package/src/style-merge.ts +40 -37
  45. package/src/synthetic-session.ts +391 -339
  46. package/src/types.ts +372 -298
  47. package/types/generated/.tsrx-typegen-manifest.json +4 -24
  48. package/types/generated/CameraView.d.ts +2 -0
  49. package/types/generated/camera-host.macos.d.ts +33 -0
  50. package/types/generated/index.d.ts +27 -26
  51. package/types/generated/photo-lifecycle.macos.d.ts +12 -0
  52. package/types/generated/photo-sheet.macos.d.ts +36 -0
  53. package/types/generated/props.d.ts +24 -2
  54. package/types/generated/session-core.d.ts +30 -1
  55. package/types/generated/synthetic-session.d.ts +7 -0
  56. package/types/generated/types.d.ts +75 -1
  57. package/platforms/macos/src/CameraOwnership.swift +0 -22
  58. package/platforms/macos/src/PhotoCaptureLifecycle.swift +0 -34
  59. package/platforms/macos/src/XplatCameraHost.swift +0 -639
  60. package/platforms/macos/src/XplatPhotoCaptureSheet.swift +0 -192
  61. package/types/generated/CameraView.android.d.ts +0 -9
  62. package/types/generated/CameraView.ios.d.ts +0 -5
  63. package/types/generated/CameraView.macos.d.ts +0 -5
  64. package/types/generated/CameraView.mobile.d.ts +0 -5
  65. package/types/generated/CameraView.windows.d.ts +0 -11
  66. package/types/generated/camera-permission.mobile.d.ts +0 -2
  67. package/types/generated/camera-permission.windows.d.ts +0 -6
  68. package/types/generated/camera-session.ios.d.ts +0 -2
  69. package/types/generated/camera-session.macos.d.ts +0 -10
  70. package/types/generated/camera-session.windows.d.ts +0 -9
  71. package/types/generated/host-movie.web.d.ts +0 -100
  72. package/types/generated/index.web.d.ts +0 -7
  73. package/types/generated/layout-child.d.ts +0 -11
  74. package/types/generated/layout-child.windows.d.ts +0 -13
  75. package/types/generated/movie-metadata.web.d.ts +0 -9
  76. package/types/generated/movie-storage.web.d.ts +0 -5
  77. package/types/generated/preview-tap.d.ts +0 -7
  78. package/types/generated/session-backend.android.d.ts +0 -3
  79. package/types/generated/session-backend.ios.d.ts +0 -5
  80. package/types/generated/session-backend.linux.d.ts +0 -3
  81. package/types/generated/session-backend.macos.d.ts +0 -8
  82. package/types/generated/session-backend.web.d.ts +0 -3
  83. package/types/generated/session-backend.windows.d.ts +0 -37
  84. package/types/generated/style-merge.d.ts +0 -8
@@ -6,54 +6,56 @@ import type { CameraSessionConfig } from './types'
6
6
  * yet. Honest `unsupported` reporting — never fabricated capture. Kept
7
7
  * platform-pure so web and native fallback builds share it. */
8
8
  export function createSessionBackend(_config: CameraSessionConfig): CameraSessionBackend {
9
- const unsupported = (operation: string) =>
10
- new CameraCaptureError({
11
- kind: 'unsupportedPlatform',
12
- operation,
13
- message: 'Movie recording is not implemented on this platform yet',
14
- })
9
+ const unsupported = (operation: string) =>
10
+ new CameraCaptureError({
11
+ kind: 'unsupportedPlatform',
12
+ operation,
13
+ message: 'Movie recording is not implemented on this platform yet',
14
+ })
15
15
 
16
- return {
17
- platform: 'unsupported',
18
- supported: false,
19
- checkPermission: async () => 'unavailable',
20
- requestPermission: async () => 'unavailable',
21
- getCapabilities: async () => ({
22
- supported: false,
23
- reason: 'Movie recording is not implemented on this platform yet',
24
- available: false,
25
- cameras: [],
26
- profiles: [],
27
- audio: false,
28
- focusPointOfInterest: false,
29
- exposurePointOfInterest: false,
30
- orientations: [],
31
- durationLimit: 'bestEffort',
32
- elapsedTime: 'estimated',
33
- output: {
34
- mimeType: '',
35
- container: '',
36
- storage: 'appPrivateFile',
37
- destinationFileUrl: false,
38
- },
39
- }),
40
- previewReady: () => false,
41
- attachPreview: () => {
42
- throw unsupported('attachPreview')
43
- },
44
- startCapture: (_request, sink) => {
45
- sink.settled({
46
- kind: 'failed',
47
- stage: 'preparation',
48
- issue: unsupported('startRecording'),
49
- })
50
- },
51
- stopCapture: () => {},
52
- elapsedMs: () => 0,
53
- openOutput: async () => {
54
- throw unsupported('openOutput')
55
- },
56
- release: async () => {},
57
- setObserver: () => {},
58
- }
16
+ return {
17
+ platform: 'unsupported',
18
+ supported: false,
19
+ checkPermission: async () => 'unavailable',
20
+ requestPermission: async () => 'unavailable',
21
+ getCapabilities: async () => ({
22
+ supported: false,
23
+ reason: 'Movie recording is not implemented on this platform yet',
24
+ available: false,
25
+ cameras: [],
26
+ profiles: [],
27
+ audio: false,
28
+ focusPointOfInterest: false,
29
+ exposurePointOfInterest: false,
30
+ zoom: false,
31
+ orientations: [],
32
+ cameraSwitchDuringRecording: false,
33
+ durationLimit: 'bestEffort',
34
+ elapsedTime: 'estimated',
35
+ output: {
36
+ mimeType: '',
37
+ container: '',
38
+ storage: 'appPrivateFile',
39
+ destinationFileUrl: false,
40
+ },
41
+ }),
42
+ previewReady: () => false,
43
+ attachPreview: () => {
44
+ throw unsupported('attachPreview')
45
+ },
46
+ startCapture: (_request, sink) => {
47
+ sink.settled({
48
+ kind: 'failed',
49
+ stage: 'preparation',
50
+ issue: unsupported('startRecording'),
51
+ })
52
+ },
53
+ stopCapture: () => {},
54
+ elapsedMs: () => 0,
55
+ openOutput: async () => {
56
+ throw unsupported('openOutput')
57
+ },
58
+ release: async () => {},
59
+ setObserver: () => {},
60
+ }
59
61
  }