@octane-xplat/camera 0.18.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.
- package/README.md +2 -132
- package/package.json +108 -103
- package/platforms/android/java/com/octanexplat/camera/CameraPreviewView.java +24 -0
- package/platforms/android/java/com/octanexplat/camera/CameraSessionBridge.java +153 -21
- package/platforms/ios/src/XplatSwitchingMovieWriter.swift +557 -0
- package/src/CameraView.android.tsrx +194 -118
- package/src/CameraView.ios.tsrx +129 -76
- package/src/CameraView.macos.tsrx +108 -70
- package/src/CameraView.tsrx +2 -0
- package/src/CameraView.web.tsrx +160 -125
- package/src/CameraView.windows.tsrx +141 -92
- package/src/camera-host.macos.ts +1059 -0
- package/src/camera-permission.mobile.ts +85 -81
- package/src/camera-permission.windows.ts +56 -53
- package/src/camera-session.ios.ts +89 -61
- package/src/camera-session.macos.ts +51 -49
- package/src/camera-session.windows.ts +113 -105
- package/src/host-movie.web.ts +266 -222
- package/src/index.ts +28 -26
- package/src/index.web.ts +27 -25
- package/src/layout-child.ts +88 -79
- package/src/layout-child.web.ts +57 -51
- package/src/layout-child.windows.ts +82 -71
- package/src/movie-metadata.web.ts +87 -74
- package/src/movie-storage.web.ts +142 -135
- package/src/movie-writer.ios.ts +170 -0
- package/src/photo-lifecycle.macos.ts +60 -0
- package/src/photo-sheet.macos.ts +505 -0
- package/src/preview-display.ios.ts +69 -0
- package/src/preview-pinch.ts +41 -0
- package/src/preview-tap.ts +22 -21
- package/src/props.ts +118 -68
- package/src/recording-haptics.ios.ts +39 -0
- package/src/recording-source.web.ts +159 -0
- package/src/session-backend.android.ts +552 -410
- package/src/session-backend.ios.ts +1500 -1148
- package/src/session-backend.linux.ts +886 -860
- package/src/session-backend.macos.ts +697 -679
- package/src/session-backend.ts +51 -49
- package/src/session-backend.web.ts +1181 -867
- package/src/session-backend.windows.ts +1556 -1467
- package/src/session-core.ts +925 -711
- package/src/session.ts +12 -12
- package/src/style-merge.ts +43 -43
- package/src/synthetic-session.ts +392 -333
- package/src/types.ts +384 -239
- package/types/generated/.tsrx-typegen-manifest.json +18 -0
- package/types/generated/CameraView.d.ts +2 -0
- package/types/generated/CameraView.web.d.ts +4 -0
- package/types/generated/camera-host.macos.d.ts +33 -0
- package/types/generated/index.d.ts +34 -0
- package/types/generated/layout-child.web.d.ts +7 -0
- package/types/generated/photo-lifecycle.macos.d.ts +12 -0
- package/types/generated/photo-sheet.macos.d.ts +36 -0
- package/types/generated/props.d.ts +111 -0
- package/types/generated/session-backend.d.ts +6 -0
- package/types/{session-core.d.ts → generated/session-core.d.ts} +30 -1
- package/types/generated/session.d.ts +16 -0
- package/types/{synthetic-session.d.ts → generated/synthetic-session.d.ts} +15 -1
- package/types/{types.d.ts → generated/types.d.ts} +145 -2
- package/LICENSE +0 -21
- package/platforms/macos/src/CameraOwnership.swift +0 -22
- package/platforms/macos/src/PhotoCaptureLifecycle.swift +0 -34
- package/platforms/macos/src/XplatCameraHost.swift +0 -639
- package/platforms/macos/src/XplatPhotoCaptureSheet.swift +0 -192
- package/types/index.d.ts +0 -48
- package/types/props.d.ts +0 -61
|
@@ -1,136 +1,212 @@
|
|
|
1
|
-
/** @jsxImportSource @
|
|
1
|
+
/** @jsxImportSource @octane-xplat/jsx */
|
|
2
2
|
import { useImperativeHandle, useCallback, useEffect, useRef } from 'octane'
|
|
3
3
|
import { Application, View } from '@nativescript/core'
|
|
4
4
|
import { registerElement } from '@nativescript-community/octane'
|
|
5
|
-
import type { Attributes } from '@
|
|
5
|
+
import type { Attributes } from '@octane-xplat/jsx/intrinsics'
|
|
6
6
|
import type { CameraViewProps } from './props'
|
|
7
7
|
import { attachSessionPreview } from './session'
|
|
8
8
|
import { cameraHardwarePresent, ensureCameraPermission } from './camera-permission.mobile'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
applyEscapeProps,
|
|
11
|
+
layoutChildProps,
|
|
12
|
+
nativeAccessibilityRole,
|
|
13
|
+
nativeAccessibilityState,
|
|
14
|
+
} from './layout-child'
|
|
15
|
+
|
|
16
|
+
import { observePreviewPinch } from './preview-pinch'
|
|
10
17
|
import { observePreviewTap } from './preview-tap'
|
|
11
18
|
import { java } from '@octane-xplat/platform/android'
|
|
12
19
|
|
|
13
|
-
|
|
14
20
|
class CameraPreview extends View {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
createNativeView() {
|
|
22
|
+
const nativeClass = (globalThis as any).com.octanexplat.camera.CameraPreviewView
|
|
23
|
+
|
|
24
|
+
return new nativeClass(this._context)
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
|
|
21
|
-
declare module '@
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
declare module '@octane-xplat/jsx/intrinsics' {
|
|
29
|
+
interface NativeElements<TElement> {
|
|
30
|
+
camerapreview: Attributes<TElement, {}>
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
registerElement('camerapreview', CameraPreview)
|
|
28
35
|
|
|
29
36
|
/** Live Android preview backed by CameraX. */
|
|
30
|
-
export function CameraView(props: CameraViewProps) @{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
37
|
+
export function CameraView(props: CameraViewProps): unknown @{
|
|
38
|
+
const host = useRef<any>(null)
|
|
39
|
+
const active = props.active !== false
|
|
40
|
+
const facing = props.facing ?? 'back'
|
|
41
|
+
|
|
42
|
+
useImperativeHandle(props.ref, () => ({ native: host.current.android }), [])
|
|
43
|
+
|
|
44
|
+
const bindHost = useCallback((view: any) => {
|
|
45
|
+
host.current = view
|
|
46
|
+
}, [])
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
const nativeView = host.current?.android
|
|
50
|
+
|
|
51
|
+
if (!nativeView) {
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let disposed = false
|
|
56
|
+
let provider: any
|
|
57
|
+
let preview: any
|
|
58
|
+
|
|
59
|
+
nativeView.setCameraActive(active)
|
|
60
|
+
if (!active) {
|
|
61
|
+
return () => nativeView.setCameraActive(false)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const fail = (message: string) => props.onError?.({ message })
|
|
65
|
+
|
|
66
|
+
if (props.session) {
|
|
67
|
+
if (props.facing !== undefined) {
|
|
68
|
+
fail('camera session conflicts with facing')
|
|
69
|
+
return () => nativeView.setCameraActive(false)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const detach = attachSessionPreview(props.session, nativeView, {
|
|
74
|
+
onReady: props.onReady,
|
|
75
|
+
onDisplayReady: props.onDisplayReady,
|
|
76
|
+
onError: (issue) => fail(issue.message),
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
return () => {
|
|
80
|
+
detach()
|
|
81
|
+
nativeView.setCameraActive(false)
|
|
82
|
+
}
|
|
83
|
+
} catch (error: any) {
|
|
84
|
+
fail(error?.message ?? 'camera session error')
|
|
85
|
+
return () => nativeView.setCameraActive(false)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!cameraHardwarePresent()) {
|
|
90
|
+
fail('camera unsupported')
|
|
91
|
+
return () => nativeView.setCameraActive(false)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
ensureCameraPermission().then((granted) => {
|
|
95
|
+
if (disposed) {
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!granted) {
|
|
100
|
+
fail('camera permission denied')
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
try {
|
|
105
|
+
const context = Application.android.context
|
|
106
|
+
const cameraX = (globalThis as any).androidx.camera
|
|
107
|
+
const future = cameraX.lifecycle.ProcessCameraProvider.getInstance(context)
|
|
108
|
+
const executor = (globalThis as any).androidx.core.content.ContextCompat.getMainExecutor(
|
|
109
|
+
context,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
future.addListener(
|
|
113
|
+
new java.lang.Runnable({
|
|
114
|
+
run() {
|
|
115
|
+
if (disposed) {
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
provider = future.get()
|
|
121
|
+
|
|
122
|
+
const selectorClass = cameraX.core.CameraSelector
|
|
123
|
+
const lens =
|
|
124
|
+
facing === 'front'
|
|
125
|
+
? selectorClass.LENS_FACING_FRONT
|
|
126
|
+
: selectorClass.LENS_FACING_BACK
|
|
127
|
+
|
|
128
|
+
const selector = new selectorClass.Builder().requireLensFacing(lens).build()
|
|
129
|
+
|
|
130
|
+
preview = new cameraX.core.Preview.Builder().build()
|
|
131
|
+
preview.setSurfaceProvider(nativeView.getSurfaceProvider())
|
|
132
|
+
provider.bindToLifecycle(nativeView, selector, preview)
|
|
133
|
+
props.onReady?.()
|
|
134
|
+
|
|
135
|
+
// CameraX STREAMING is the displayed-frame edge; the
|
|
136
|
+
// PreviewView is its own LifecycleOwner here. LiveData can
|
|
137
|
+
// re-emit a value, so dedupe into displayed transitions.
|
|
138
|
+
let displayed = false
|
|
139
|
+
|
|
140
|
+
nativeView.getStreamState?.().observe(
|
|
141
|
+
nativeView,
|
|
142
|
+
new (globalThis as any).androidx.lifecycle.Observer({
|
|
143
|
+
onChanged(state: any) {
|
|
144
|
+
const streaming =
|
|
145
|
+
state ===
|
|
146
|
+
(globalThis as any).androidx.camera.view.PreviewView.StreamState.STREAMING
|
|
147
|
+
|
|
148
|
+
if (!disposed && streaming && !displayed) {
|
|
149
|
+
props.onDisplayReady?.()
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
displayed = streaming
|
|
153
|
+
},
|
|
154
|
+
}),
|
|
155
|
+
)
|
|
156
|
+
} catch (error: any) {
|
|
157
|
+
fail(error?.message ?? 'camera error')
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
}),
|
|
161
|
+
executor,
|
|
162
|
+
)
|
|
163
|
+
} catch (error: any) {
|
|
164
|
+
fail(error?.message ?? 'camera error')
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
return () => {
|
|
169
|
+
disposed = true
|
|
170
|
+
nativeView.setCameraActive(false)
|
|
171
|
+
if (provider && preview) {
|
|
172
|
+
try {
|
|
173
|
+
provider.unbind(preview)
|
|
174
|
+
} catch {}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}, [active, facing, props.session])
|
|
178
|
+
|
|
179
|
+
useEffect(() => {
|
|
180
|
+
const view = host.current
|
|
181
|
+
|
|
182
|
+
if (!view) {
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
applyEscapeProps(view.android, props)
|
|
187
|
+
}, [props.ref, props.android])
|
|
188
|
+
|
|
189
|
+
useEffect(() => observePreviewTap(host.current, props.onTap), [props.onTap])
|
|
190
|
+
useEffect(() => observePreviewPinch(host.current, props.onPinch), [props.onPinch])
|
|
191
|
+
|
|
192
|
+
<masonview
|
|
193
|
+
id={props.id}
|
|
194
|
+
className={['vx-layers', 'vx-cameraview', props.className]}
|
|
195
|
+
{...layoutChildProps(props, {
|
|
196
|
+
display: 'grid',
|
|
197
|
+
gridTemplateRows: '1fr',
|
|
198
|
+
gridTemplateColumns: '1fr',
|
|
199
|
+
backgroundColor: '#000',
|
|
200
|
+
...props.style,
|
|
201
|
+
})}
|
|
202
|
+
accessible={props.accessible}
|
|
203
|
+
accessibilityLabel={props.accessibilityLabel}
|
|
204
|
+
accessibilityRole={nativeAccessibilityRole(props.accessibilityRole) as any}
|
|
205
|
+
accessibilityHint={props.accessibilityHint}
|
|
206
|
+
accessibilityValue={props.accessibilityValue}
|
|
207
|
+
accessibilityState={nativeAccessibilityState(props.accessibilityState) as any}
|
|
208
|
+
accessibilityLiveRegion={props.accessibilityLiveRegion as any}
|
|
209
|
+
>
|
|
210
|
+
<camerapreview ref={bindHost} style={{ gridRow: '1', gridColumn: '1' }} />
|
|
211
|
+
</masonview>
|
|
136
212
|
}
|
package/src/CameraView.ios.tsrx
CHANGED
|
@@ -1,87 +1,140 @@
|
|
|
1
|
-
/** @jsxImportSource @
|
|
1
|
+
/** @jsxImportSource @octane-xplat/jsx */
|
|
2
2
|
import { useImperativeHandle, useCallback, useEffect, useRef } from 'octane'
|
|
3
3
|
import type { CameraViewProps } from './props'
|
|
4
4
|
import { cameraHardwarePresent, ensureCameraPermission } from './camera-permission.mobile'
|
|
5
5
|
import { startCameraPreview } from './camera-session.ios'
|
|
6
6
|
import { attachSessionPreview } from './session'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
applyEscapeProps,
|
|
9
|
+
layoutChildProps,
|
|
10
|
+
nativeAccessibilityRole,
|
|
11
|
+
nativeAccessibilityState,
|
|
12
|
+
} from './layout-child'
|
|
13
|
+
|
|
14
|
+
import { observePreviewPinch } from './preview-pinch'
|
|
8
15
|
import { observePreviewTap } from './preview-tap'
|
|
9
16
|
|
|
10
17
|
/** Live iOS preview backed by AVFoundation. With `session`, the preview
|
|
11
18
|
* attaches to the session-owned AVCaptureSession so movie recording can
|
|
12
19
|
* share it; without one the view owns its session as before. */
|
|
13
|
-
export function CameraView(props: CameraViewProps) @{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
20
|
+
export function CameraView(props: CameraViewProps): unknown @{
|
|
21
|
+
const host = useRef<any>(null)
|
|
22
|
+
const active = props.active !== false
|
|
23
|
+
const facing = props.facing ?? 'back'
|
|
24
|
+
|
|
25
|
+
useImperativeHandle(
|
|
26
|
+
props.ref,
|
|
27
|
+
() => ({ native: host.current.ios ?? host.current.nativeViewProtected }),
|
|
28
|
+
[],
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const bindHost = useCallback((view: any) => {
|
|
32
|
+
host.current = view
|
|
33
|
+
}, [])
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const view = host.current
|
|
37
|
+
|
|
38
|
+
if (!view || !active) {
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let disposed = false
|
|
43
|
+
let stopPreview: (() => void) | undefined
|
|
44
|
+
const fail = (message: string) => props.onError?.({ message })
|
|
45
|
+
|
|
46
|
+
if (props.session) {
|
|
47
|
+
if (props.facing !== undefined) {
|
|
48
|
+
fail('camera session conflicts with facing')
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
const detach = attachSessionPreview(props.session, view, {
|
|
54
|
+
onReady: () => {
|
|
55
|
+
if (!disposed) {
|
|
56
|
+
props.onReady?.()
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
onDisplayReady: () => {
|
|
60
|
+
if (!disposed) {
|
|
61
|
+
props.onDisplayReady?.()
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
return () => {
|
|
67
|
+
disposed = true
|
|
68
|
+
detach()
|
|
69
|
+
}
|
|
70
|
+
} catch (error: any) {
|
|
71
|
+
fail(error?.message ?? 'camera session error')
|
|
72
|
+
return
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (!cameraHardwarePresent()) {
|
|
77
|
+
fail('camera unsupported')
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
ensureCameraPermission().then((granted) => {
|
|
82
|
+
if (disposed) {
|
|
83
|
+
return
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!granted) {
|
|
87
|
+
fail('camera permission denied')
|
|
88
|
+
return
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
stopPreview = startCameraPreview(view, facing, props.onReady, () => {
|
|
93
|
+
if (!disposed) {
|
|
94
|
+
props.onDisplayReady?.()
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
} catch (error: any) {
|
|
98
|
+
fail(error?.message ?? 'camera error')
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
return () => {
|
|
103
|
+
disposed = true
|
|
104
|
+
stopPreview?.()
|
|
105
|
+
}
|
|
106
|
+
}, [active, facing, props.session])
|
|
107
|
+
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
const view = host.current
|
|
110
|
+
|
|
111
|
+
if (!view) {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
applyEscapeProps(view.ios ?? view.nativeViewProtected, props)
|
|
116
|
+
}, [props.ref, props.ios])
|
|
117
|
+
|
|
118
|
+
useEffect(() => observePreviewTap(host.current, props.onTap), [props.onTap])
|
|
119
|
+
useEffect(() => observePreviewPinch(host.current, props.onPinch), [props.onPinch])
|
|
120
|
+
|
|
121
|
+
<masonview
|
|
122
|
+
ref={bindHost}
|
|
123
|
+
id={props.id}
|
|
124
|
+
className={['vx-layers', 'vx-cameraview', props.className]}
|
|
125
|
+
{...layoutChildProps(props, {
|
|
126
|
+
display: 'grid',
|
|
127
|
+
gridTemplateRows: '1fr',
|
|
128
|
+
gridTemplateColumns: '1fr',
|
|
129
|
+
backgroundColor: '#000',
|
|
130
|
+
...props.style,
|
|
131
|
+
})}
|
|
132
|
+
accessible={props.accessible}
|
|
133
|
+
accessibilityLabel={props.accessibilityLabel}
|
|
134
|
+
accessibilityRole={nativeAccessibilityRole(props.accessibilityRole) as any}
|
|
135
|
+
accessibilityHint={props.accessibilityHint}
|
|
136
|
+
accessibilityValue={props.accessibilityValue}
|
|
137
|
+
accessibilityState={nativeAccessibilityState(props.accessibilityState) as any}
|
|
138
|
+
accessibilityLiveRegion={props.accessibilityLiveRegion as any}
|
|
139
|
+
/>
|
|
87
140
|
}
|