@octane-xplat/camera 0.14.0 → 0.16.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 (83) hide show
  1. package/README.md +26 -0
  2. package/package.json +22 -16
  3. package/platforms/android/java/com/octanexplat/camera/CameraPreviewView.java +9 -0
  4. package/platforms/android/java/com/octanexplat/camera/CameraSessionBridge.java +31 -0
  5. package/platforms/macos/src/CameraOwnership.swift +22 -0
  6. package/platforms/macos/src/PhotoCaptureLifecycle.swift +34 -0
  7. package/platforms/macos/src/XplatCameraHost.swift +139 -13
  8. package/platforms/macos/src/XplatPhotoCaptureSheet.swift +192 -0
  9. package/src/CameraView.android.tsrx +8 -18
  10. package/src/CameraView.ios.tsrx +4 -17
  11. package/src/CameraView.macos.tsrx +4 -17
  12. package/src/CameraView.web.tsrx +11 -0
  13. package/src/CameraView.windows.tsrx +6 -18
  14. package/src/camera-permission.mobile.ts +18 -4
  15. package/src/camera-session.windows.ts +4 -1
  16. package/src/host-movie.web.ts +141 -26
  17. package/src/index.ts +1 -0
  18. package/src/index.web.ts +1 -0
  19. package/src/layout-child.ts +39 -18
  20. package/src/layout-child.windows.ts +5 -2
  21. package/src/preview-tap.ts +34 -0
  22. package/src/props.ts +8 -1
  23. package/src/session-backend.android.ts +42 -0
  24. package/src/session-backend.ios.ts +183 -17
  25. package/src/session-backend.linux.ts +22 -4
  26. package/src/session-backend.macos.ts +100 -17
  27. package/src/session-backend.ts +2 -0
  28. package/src/session-backend.web.ts +17 -0
  29. package/src/session-backend.windows.ts +88 -6
  30. package/src/session-core.ts +73 -9
  31. package/src/synthetic-session.ts +10 -0
  32. package/src/types.ts +28 -0
  33. package/types/props.d.ts +8 -1
  34. package/types/session-core.d.ts +11 -1
  35. package/types/synthetic-session.d.ts +4 -1
  36. package/types/types.d.ts +27 -0
  37. package/dist/linux/CameraView.web.tsrx.js +0 -337
  38. package/dist/linux/host-movie.web.js +0 -100
  39. package/dist/linux/index.js +0 -5
  40. package/dist/linux/layout-child.web.js +0 -29
  41. package/dist/linux/movie-metadata.web.js +0 -65
  42. package/dist/linux/octane-client-build.json +0 -8
  43. package/dist/linux/session-backend.linux.js +0 -479
  44. package/dist/linux/session-core.js +0 -368
  45. package/dist/linux/session.js +0 -29
  46. package/dist/linux/synthetic-session.js +0 -280
  47. package/dist/linux/types.js +0 -19
  48. package/dist/native/CameraView.android.js +0 -190
  49. package/dist/native/CameraView.ios.js +0 -154
  50. package/dist/native/CameraView.windows.js +0 -173
  51. package/dist/native/camera-permission.mobile.js +0 -45
  52. package/dist/native/camera-permission.windows.js +0 -43
  53. package/dist/native/camera-session.ios.js +0 -45
  54. package/dist/native/camera-session.windows.js +0 -78
  55. package/dist/native/cx.mobile.js +0 -9
  56. package/dist/native/cx.windows.js +0 -9
  57. package/dist/native/index.js +0 -5
  58. package/dist/native/layout-child.js +0 -53
  59. package/dist/native/layout-child.windows.js +0 -53
  60. package/dist/native/octane-client-build.json +0 -8
  61. package/dist/native/session-backend.android.js +0 -234
  62. package/dist/native/session-backend.ios.js +0 -682
  63. package/dist/native/session-backend.js +0 -55
  64. package/dist/native/session-backend.windows.js +0 -905
  65. package/dist/native/session-core.js +0 -368
  66. package/dist/native/session.js +0 -29
  67. package/dist/native/synthetic-session.js +0 -280
  68. package/dist/native/types.js +0 -19
  69. package/dist/web/CameraView.web.tsrx.js +0 -337
  70. package/dist/web/host-movie.web.js +0 -100
  71. package/dist/web/index.js +0 -5
  72. package/dist/web/layout-child.web.js +0 -29
  73. package/dist/web/movie-metadata.web.js +0 -65
  74. package/dist/web/movie-storage.web.js +0 -119
  75. package/dist/web/octane-client-build.json +0 -8
  76. package/dist/web/session-backend.web.js +0 -490
  77. package/dist/web/session-core.js +0 -368
  78. package/dist/web/session.js +0 -29
  79. package/dist/web/synthetic-session.js +0 -280
  80. package/dist/web/types.js +0 -19
  81. package/src/cx.macos.ts +0 -5
  82. package/src/cx.mobile.ts +0 -6
  83. package/src/cx.windows.ts +0 -6
@@ -1,55 +0,0 @@
1
- import { CameraCaptureError } from "./types.js";
2
- //#region src/session-backend.ts
3
- /** Default adapter for platforms without a movie-capture implementation
4
- * yet. Honest `unsupported` reporting — never fabricated capture. Kept
5
- * platform-pure so web and native fallback builds share it. */
6
- function createSessionBackend(_config) {
7
- const unsupported = (operation) => new CameraCaptureError({
8
- kind: "unsupportedPlatform",
9
- operation,
10
- message: "Movie recording is not implemented on this platform yet"
11
- });
12
- return {
13
- platform: "unsupported",
14
- supported: false,
15
- checkPermission: async () => "unavailable",
16
- requestPermission: async () => "unavailable",
17
- getCapabilities: async () => ({
18
- supported: false,
19
- reason: "Movie recording is not implemented on this platform yet",
20
- available: false,
21
- cameras: [],
22
- profiles: [],
23
- audio: false,
24
- orientations: [],
25
- durationLimit: "bestEffort",
26
- elapsedTime: "estimated",
27
- output: {
28
- mimeType: "",
29
- container: "",
30
- storage: "appPrivateFile",
31
- destinationFileUrl: false
32
- }
33
- }),
34
- previewReady: () => false,
35
- attachPreview: () => {
36
- throw unsupported("attachPreview");
37
- },
38
- startCapture: (_request, sink) => {
39
- sink.settled({
40
- kind: "failed",
41
- stage: "preparation",
42
- issue: unsupported("startRecording")
43
- });
44
- },
45
- stopCapture: () => {},
46
- elapsedMs: () => 0,
47
- openOutput: async () => {
48
- throw unsupported("openOutput");
49
- },
50
- release: async () => {},
51
- setObserver: () => {}
52
- };
53
- }
54
- //#endregion
55
- export { createSessionBackend };