@octane-xplat/camera 0.7.3 → 0.8.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.
|
@@ -5,7 +5,7 @@ function cameraHardwarePresent() {
|
|
|
5
5
|
if (isIOS) return typeof globalThis.AVCaptureDevice !== "undefined";
|
|
6
6
|
if (!isAndroid) return false;
|
|
7
7
|
try {
|
|
8
|
-
return (Application.android?.context ?? Application.android?.startActivity)?.
|
|
8
|
+
return (Application.android?.context ?? Application.android?.startActivity)?.getPackageManager()?.hasSystemFeature("android.hardware.camera.any") !== false;
|
|
9
9
|
} catch {
|
|
10
10
|
return true;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octane-xplat/camera",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Live camera preview for Octane xplat — web getUserMedia + native capture (AVCapture / CameraX)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"octane",
|
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@nativescript-community/octane": "0.2.
|
|
50
|
+
"@nativescript-community/octane": "0.2.4",
|
|
51
51
|
"@nativescript/core": "9.1.2",
|
|
52
52
|
"@octanejs/vite-plugin": "0.1.61",
|
|
53
53
|
"octane": "0.6.3",
|
|
54
|
+
"tsrx-typegen": "0.2.0",
|
|
54
55
|
"typescript": "5.9.3",
|
|
55
56
|
"vite": "8.3.0"
|
|
56
57
|
},
|
|
@@ -71,6 +72,9 @@
|
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
"scripts": {
|
|
74
|
-
"build": "vite build && vite build --mode native &&
|
|
75
|
+
"build": "vite build && vite build --mode native && pnpm typegen && node ../../scripts/check-native-dist.mjs",
|
|
76
|
+
"typegen": "tsc -p tsconfig.types.json",
|
|
77
|
+
"test:packed": "node tests/packed-consumer.mjs",
|
|
78
|
+
"pack:check": "tsrx-typegen --pack-check"
|
|
75
79
|
}
|
|
76
80
|
}
|
|
@@ -7,7 +7,7 @@ export function cameraHardwarePresent(): boolean {
|
|
|
7
7
|
if (!isAndroid) {return false}
|
|
8
8
|
try {
|
|
9
9
|
const context = Application.android?.context ?? Application.android?.startActivity
|
|
10
|
-
|
|
10
|
+
return context?.getPackageManager()?.hasSystemFeature('android.hardware.camera.any') !== false
|
|
11
11
|
} catch {
|
|
12
12
|
return true
|
|
13
13
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UniversalComponent } from 'octane/universal'
|
|
2
|
-
import type { CameraViewProps } from './props'
|
|
2
|
+
import type { CameraViewProps } from './props.js'
|
|
3
3
|
|
|
4
4
|
export declare const CameraView: UniversalComponent<CameraViewProps>
|
|
5
|
-
export type { CameraViewHandle, CameraViewProps, CameraAccessibilityRole } from './props'
|
|
5
|
+
export type { CameraViewHandle, CameraViewProps, CameraAccessibilityRole } from './props.js'
|