theta-client-react-native 1.13.1 → 1.14.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.ja.md +7 -0
- package/README.md +7 -0
- package/android/build.gradle +14 -86
- package/android/gradle.properties +3 -4
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +2 -0
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +205 -116
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkPackage.kt +22 -8
- package/ios/ConvertUtil.swift +5 -0
- package/ios/ThetaClientReactNative.mm +37 -0
- package/ios/ThetaClientReactNative.swift +126 -143
- package/lib/commonjs/NativeThetaClientReactNative.js +34 -0
- package/lib/commonjs/NativeThetaClientReactNative.js.map +1 -0
- package/lib/commonjs/capture/burst-capture.js +6 -6
- package/lib/commonjs/capture/burst-capture.js.map +1 -1
- package/lib/commonjs/capture/composite-interval-capture.js +6 -6
- package/lib/commonjs/capture/composite-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/continuous-capture.js +5 -5
- package/lib/commonjs/capture/continuous-capture.js.map +1 -1
- package/lib/commonjs/capture/limitless-interval-capture.js +6 -6
- package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/multi-bracket-capture.js +6 -6
- package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -1
- package/lib/commonjs/capture/photo-capture.js +5 -5
- package/lib/commonjs/capture/photo-capture.js.map +1 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js +6 -6
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/time-shift-capture.js +6 -6
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/capture/time-shift-manual-capture.js +7 -7
- package/lib/commonjs/capture/time-shift-manual-capture.js.map +1 -1
- package/lib/commonjs/capture/video-capture.js +6 -6
- package/lib/commonjs/capture/video-capture.js.map +1 -1
- package/lib/commonjs/index.js +12 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/event-websocket.js +4 -4
- package/lib/commonjs/theta-repository/event-websocket.js.map +1 -1
- package/lib/commonjs/theta-repository/libs/convert-video-formats.js +3 -3
- package/lib/commonjs/theta-repository/libs/convert-video-formats.js.map +1 -1
- package/lib/commonjs/theta-repository/notify-controller.js +3 -1
- package/lib/commonjs/theta-repository/notify-controller.js.map +1 -1
- package/lib/commonjs/theta-repository/options/index.js +11 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-mode-memory.js +33 -0
- package/lib/commonjs/theta-repository/options/option-mode-memory.js.map +1 -0
- package/lib/commonjs/theta-repository/options/options.js +2 -0
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +54 -64
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/NativeThetaClientReactNative.js +28 -0
- package/lib/module/NativeThetaClientReactNative.js.map +1 -0
- package/lib/module/capture/burst-capture.js +1 -2
- package/lib/module/capture/burst-capture.js.map +1 -1
- package/lib/module/capture/composite-interval-capture.js +1 -2
- package/lib/module/capture/composite-interval-capture.js.map +1 -1
- package/lib/module/capture/continuous-capture.js +1 -2
- package/lib/module/capture/continuous-capture.js.map +1 -1
- package/lib/module/capture/limitless-interval-capture.js +1 -2
- package/lib/module/capture/limitless-interval-capture.js.map +1 -1
- package/lib/module/capture/multi-bracket-capture.js +1 -2
- package/lib/module/capture/multi-bracket-capture.js.map +1 -1
- package/lib/module/capture/photo-capture.js +1 -2
- package/lib/module/capture/photo-capture.js.map +1 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js +1 -2
- package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +1 -2
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/capture/time-shift-manual-capture.js +1 -2
- package/lib/module/capture/time-shift-manual-capture.js.map +1 -1
- package/lib/module/capture/video-capture.js +1 -2
- package/lib/module/capture/video-capture.js.map +1 -1
- package/lib/module/index.js +11 -12
- package/lib/module/index.js.map +1 -1
- package/lib/module/theta-repository/event-websocket.js +1 -2
- package/lib/module/theta-repository/event-websocket.js.map +1 -1
- package/lib/module/theta-repository/libs/convert-video-formats.js +1 -2
- package/lib/module/theta-repository/libs/convert-video-formats.js.map +1 -1
- package/lib/module/theta-repository/notify-controller.js +3 -2
- package/lib/module/theta-repository/notify-controller.js.map +1 -1
- package/lib/module/theta-repository/options/index.js +1 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-mode-memory.js +27 -0
- package/lib/module/theta-repository/options/option-mode-memory.js.map +1 -0
- package/lib/module/theta-repository/options/options.js +2 -0
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +15 -26
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/typescript/NativeThetaClientReactNative.d.ts +91 -0
- package/lib/typescript/NativeThetaClientReactNative.d.ts.map +1 -0
- package/lib/typescript/capture/burst-capture.d.ts.map +1 -1
- package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/continuous-capture.d.ts +2 -1
- package/lib/typescript/capture/continuous-capture.d.ts.map +1 -1
- package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -1
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-manual-capture.d.ts.map +1 -1
- package/lib/typescript/capture/video-capture.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +6 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/event-websocket.d.ts.map +1 -1
- package/lib/typescript/theta-repository/notify-controller.d.ts +2 -1
- package/lib/typescript/theta-repository/notify-controller.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/index.d.ts +1 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-mode-memory.d.ts +27 -0
- package/lib/typescript/theta-repository/options/option-mode-memory.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/options.d.ts +5 -0
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +6 -6
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/package.json +35 -27
- package/src/NativeThetaClientReactNative.ts +199 -0
- package/src/capture/burst-capture.ts +3 -6
- package/src/capture/capture.ts +1 -1
- package/src/capture/composite-interval-capture.ts +3 -6
- package/src/capture/continuous-capture.ts +4 -7
- package/src/capture/limitless-interval-capture.ts +3 -6
- package/src/capture/multi-bracket-capture.ts +3 -6
- package/src/capture/photo-capture.ts +3 -6
- package/src/capture/shot-count-specified-interval-capture.ts +3 -6
- package/src/capture/time-shift-capture.ts +3 -6
- package/src/capture/time-shift-manual-capture.ts +3 -6
- package/src/capture/video-capture.ts +3 -6
- package/src/index.tsx +12 -19
- package/src/theta-repository/event-websocket.ts +1 -3
- package/src/theta-repository/libs/convert-video-formats.ts +3 -3
- package/src/theta-repository/notify-controller.ts +4 -8
- package/src/theta-repository/options/index.ts +1 -0
- package/src/theta-repository/options/option-mode-memory.ts +28 -0
- package/src/theta-repository/options/options.ts +5 -0
- package/src/theta-repository/theta-repository.ts +28 -36
- package/theta-client-react-native.podspec +4 -19
- package/ios/ThetaClientReactNative.m +0 -308
- package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +0 -283
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
// Event listeners for Android old architecture only
|
|
6
|
+
addListener(eventName: string): void;
|
|
7
|
+
removeListeners(count: number): void;
|
|
8
|
+
|
|
9
|
+
// API Log
|
|
10
|
+
setApiLogListener(enabled: boolean): Promise<void>;
|
|
11
|
+
|
|
12
|
+
// Initialize
|
|
13
|
+
initialize(
|
|
14
|
+
endPoint: string,
|
|
15
|
+
config: Object | null,
|
|
16
|
+
timeout: Object | null
|
|
17
|
+
): Promise<boolean>;
|
|
18
|
+
|
|
19
|
+
isInitialized(): Promise<boolean>;
|
|
20
|
+
|
|
21
|
+
// Get theta info
|
|
22
|
+
getThetaModel(): Promise<string | undefined>;
|
|
23
|
+
getThetaInfo(): Promise<Object>;
|
|
24
|
+
getThetaLicense(): Promise<string>;
|
|
25
|
+
getThetaState(): Promise<Object>;
|
|
26
|
+
|
|
27
|
+
// File operations
|
|
28
|
+
listFiles(
|
|
29
|
+
fileType: string,
|
|
30
|
+
startPosition: number,
|
|
31
|
+
entryCount: number,
|
|
32
|
+
storage: string | null
|
|
33
|
+
): Promise<Object>;
|
|
34
|
+
|
|
35
|
+
deleteFiles(fileUrls: Array<string>): Promise<boolean>;
|
|
36
|
+
deleteAllFiles(): Promise<boolean>;
|
|
37
|
+
deleteAllImageFiles(): Promise<boolean>;
|
|
38
|
+
deleteAllVideoFiles(): Promise<boolean>;
|
|
39
|
+
|
|
40
|
+
// Options
|
|
41
|
+
getOptions(optionNames: Array<string>): Promise<Object>;
|
|
42
|
+
setOptions(options: Object): Promise<boolean>;
|
|
43
|
+
|
|
44
|
+
// Live preview
|
|
45
|
+
getLivePreview(): Promise<boolean>;
|
|
46
|
+
stopLivePreview(): Promise<boolean>;
|
|
47
|
+
|
|
48
|
+
// Photo capture
|
|
49
|
+
getPhotoCaptureBuilder(): Promise<void>;
|
|
50
|
+
buildPhotoCapture(options: Object): Promise<void>;
|
|
51
|
+
takePicture(): Promise<string>;
|
|
52
|
+
|
|
53
|
+
// TimeShift capture
|
|
54
|
+
getTimeShiftCaptureBuilder(): Promise<void>;
|
|
55
|
+
buildTimeShiftCapture(options: Object): Promise<void>;
|
|
56
|
+
startTimeShiftCapture(): Promise<string>;
|
|
57
|
+
cancelTimeShiftCapture(): Promise<void>;
|
|
58
|
+
|
|
59
|
+
// TimeShift manual capture
|
|
60
|
+
getTimeShiftManualCaptureBuilder(): Promise<void>;
|
|
61
|
+
buildTimeShiftManualCapture(options: Object): Promise<void>;
|
|
62
|
+
startTimeShiftManualCapture(): Promise<string>;
|
|
63
|
+
startTimeShiftManualSecondCapture(): Promise<string>;
|
|
64
|
+
cancelTimeShiftManualCapture(): Promise<void>;
|
|
65
|
+
|
|
66
|
+
// Video capture
|
|
67
|
+
getVideoCaptureBuilder(): Promise<void>;
|
|
68
|
+
buildVideoCapture(options: Object): Promise<void>;
|
|
69
|
+
startVideoCapture(): Promise<string>;
|
|
70
|
+
stopVideoCapture(): Promise<string>;
|
|
71
|
+
|
|
72
|
+
// Limitless interval capture
|
|
73
|
+
getLimitlessIntervalCaptureBuilder(): Promise<void>;
|
|
74
|
+
buildLimitlessIntervalCapture(options: Object): Promise<void>;
|
|
75
|
+
startLimitlessIntervalCapture(): Promise<Array<string>>;
|
|
76
|
+
stopLimitlessIntervalCapture(): Promise<Array<string>>;
|
|
77
|
+
|
|
78
|
+
// Shot count specified interval capture
|
|
79
|
+
getShotCountSpecifiedIntervalCaptureBuilder(shotCount: number): Promise<void>;
|
|
80
|
+
buildShotCountSpecifiedIntervalCapture(options: Object): Promise<void>;
|
|
81
|
+
startShotCountSpecifiedIntervalCapture(): Promise<Array<string>>;
|
|
82
|
+
cancelShotCountSpecifiedIntervalCapture(): Promise<void>;
|
|
83
|
+
|
|
84
|
+
// Composite interval capture
|
|
85
|
+
getCompositeIntervalCaptureBuilder(shootingTimeSec: number): Promise<void>;
|
|
86
|
+
buildCompositeIntervalCapture(options: Object): Promise<void>;
|
|
87
|
+
startCompositeIntervalCapture(): Promise<Array<string>>;
|
|
88
|
+
cancelCompositeIntervalCapture(): Promise<void>;
|
|
89
|
+
|
|
90
|
+
// Burst capture
|
|
91
|
+
getBurstCaptureBuilder(
|
|
92
|
+
burstCaptureNum: string,
|
|
93
|
+
burstBracketStep: string,
|
|
94
|
+
burstCompensation: string,
|
|
95
|
+
burstMaxExposureTime: string,
|
|
96
|
+
burstEnableIsoControl: string,
|
|
97
|
+
burstOrder: string
|
|
98
|
+
): Promise<void>;
|
|
99
|
+
buildBurstCapture(options: Object): Promise<void>;
|
|
100
|
+
startBurstCapture(): Promise<Array<string>>;
|
|
101
|
+
cancelBurstCapture(): Promise<void>;
|
|
102
|
+
|
|
103
|
+
// Multi bracket capture
|
|
104
|
+
getMultiBracketCaptureBuilder(): Promise<void>;
|
|
105
|
+
buildMultiBracketCapture(options: Object): Promise<void>;
|
|
106
|
+
startMultiBracketCapture(): Promise<Array<string>>;
|
|
107
|
+
cancelMultiBracketCapture(): Promise<void>;
|
|
108
|
+
|
|
109
|
+
// Continuous capture
|
|
110
|
+
getContinuousCaptureBuilder(): Promise<void>;
|
|
111
|
+
buildContinuousCapture(options: Object): Promise<void>;
|
|
112
|
+
startContinuousCapture(): Promise<Array<string>>;
|
|
113
|
+
|
|
114
|
+
// Metadata
|
|
115
|
+
getMetadata(fileUrl: string): Promise<Object>;
|
|
116
|
+
|
|
117
|
+
// Commands
|
|
118
|
+
reboot(): Promise<void>;
|
|
119
|
+
reset(): Promise<boolean>;
|
|
120
|
+
restoreSettings(): Promise<boolean>;
|
|
121
|
+
stopSelfTimer(): Promise<boolean>;
|
|
122
|
+
|
|
123
|
+
// Video convert
|
|
124
|
+
convertVideoFormats(
|
|
125
|
+
fileUrl: string,
|
|
126
|
+
toLowResolution: boolean,
|
|
127
|
+
applyTopBottomCorrection: boolean
|
|
128
|
+
): Promise<string>;
|
|
129
|
+
cancelVideoConvert(): Promise<boolean>;
|
|
130
|
+
|
|
131
|
+
// WLAN
|
|
132
|
+
finishWlan(): Promise<boolean>;
|
|
133
|
+
listAccessPoints(): Promise<Array<Object>>;
|
|
134
|
+
setAccessPointDynamically(params: Object): Promise<boolean>;
|
|
135
|
+
setAccessPointStatically(params: Object): Promise<boolean>;
|
|
136
|
+
setAccessPointConnectionPriority(
|
|
137
|
+
ssid: string,
|
|
138
|
+
connectionPriority: number,
|
|
139
|
+
ssidStealth: boolean
|
|
140
|
+
): Promise<boolean>;
|
|
141
|
+
deleteAccessPoint(ssid: string): Promise<boolean>;
|
|
142
|
+
|
|
143
|
+
// My setting
|
|
144
|
+
getMySetting(captureMode: string): Promise<Object>;
|
|
145
|
+
getMySettingFromOldModel(optionNames: Array<string>): Promise<Object>;
|
|
146
|
+
setMySetting(captureMode: string, options: Object): Promise<boolean>;
|
|
147
|
+
deleteMySetting(captureMode: string): Promise<boolean>;
|
|
148
|
+
|
|
149
|
+
// Plugin
|
|
150
|
+
listPlugins(): Promise<Array<Object>>;
|
|
151
|
+
setPlugin(packageName: string): Promise<boolean>;
|
|
152
|
+
startPlugin(packageName: string): Promise<boolean>;
|
|
153
|
+
stopPlugin(): Promise<boolean>;
|
|
154
|
+
getPluginLicense(packageName: string): Promise<string>;
|
|
155
|
+
getPluginOrders(): Promise<Array<string>>;
|
|
156
|
+
setPluginOrders(plugins: Array<string>): Promise<boolean>;
|
|
157
|
+
|
|
158
|
+
// Bluetooth
|
|
159
|
+
setBluetoothDevice(uuid: string): Promise<string>;
|
|
160
|
+
|
|
161
|
+
// Event WebSocket
|
|
162
|
+
getEventWebSocket(): Promise<void>;
|
|
163
|
+
eventWebSocketStart(): Promise<void>;
|
|
164
|
+
eventWebSocketStop(): Promise<void>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// New Architecture only: resolve TurboModule on first access
|
|
168
|
+
let cachedModule: Spec | null = null;
|
|
169
|
+
|
|
170
|
+
function getModule(): Spec {
|
|
171
|
+
if (cachedModule != null) {
|
|
172
|
+
return cachedModule;
|
|
173
|
+
}
|
|
174
|
+
const turbo = TurboModuleRegistry.get<Spec>('ThetaClientReactNative');
|
|
175
|
+
if (turbo == null) {
|
|
176
|
+
// In test environment, return a mock object instead of throwing
|
|
177
|
+
if (
|
|
178
|
+
process.env.NODE_ENV === 'test' ||
|
|
179
|
+
process.env.JEST_WORKER_ID !== undefined
|
|
180
|
+
) {
|
|
181
|
+
cachedModule = {} as Spec;
|
|
182
|
+
return cachedModule;
|
|
183
|
+
}
|
|
184
|
+
throw new Error(
|
|
185
|
+
'ThetaClientReactNative TurboModule could not be found. Ensure New Architecture is enabled and the module is registered in the native binary.'
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
cachedModule = turbo;
|
|
189
|
+
return cachedModule;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export default new Proxy({} as Spec, {
|
|
193
|
+
get(_, prop: string | symbol) {
|
|
194
|
+
const module = getModule();
|
|
195
|
+
const value = module[prop as keyof Spec];
|
|
196
|
+
// Return the value directly - if it's a function, it will be callable
|
|
197
|
+
return value;
|
|
198
|
+
},
|
|
199
|
+
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
BaseNotify,
|
|
5
|
-
NotifyController,
|
|
6
|
-
} from '../theta-repository/notify-controller';
|
|
2
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
3
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
7
4
|
import type {
|
|
8
5
|
BurstBracketStepEnum,
|
|
9
6
|
BurstCaptureNumEnum,
|
|
@@ -13,7 +10,7 @@ import type {
|
|
|
13
10
|
BurstModeEnum,
|
|
14
11
|
BurstOrderEnum,
|
|
15
12
|
} from '../theta-repository/options';
|
|
16
|
-
|
|
13
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
17
14
|
|
|
18
15
|
const NOTIFY_PROGRESS = 'BURST-PROGRESS';
|
|
19
16
|
const NOTIFY_STOP_ERROR = 'BURST-STOP-ERROR';
|
package/src/capture/capture.ts
CHANGED
|
@@ -148,7 +148,7 @@ export type CapturingStatusEnum =
|
|
|
148
148
|
(typeof CapturingStatusEnum)[keyof typeof CapturingStatusEnum];
|
|
149
149
|
|
|
150
150
|
export class PhotoCaptureBuilderBase<
|
|
151
|
-
T extends PhotoCaptureBuilderBase<T
|
|
151
|
+
T extends PhotoCaptureBuilderBase<T>,
|
|
152
152
|
> extends CaptureBuilder<T> {
|
|
153
153
|
/**
|
|
154
154
|
* Set photo file format.
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
NotifyController,
|
|
6
|
-
} from '../theta-repository/notify-controller';
|
|
7
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
4
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
8
5
|
|
|
9
6
|
const NOTIFY_PROGRESS = 'COMPOSITE-INTERVAL-PROGRESS';
|
|
10
7
|
const NOTIFY_STOP_ERROR = 'COMPOSITE-INTERVAL-STOP-ERROR';
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from '../theta-repository/notify-controller';
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
4
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
5
|
+
import type { PhotoFileFormatEnum } from '../theta-repository/options';
|
|
7
6
|
import {
|
|
8
7
|
ContinuousNumberEnum,
|
|
9
|
-
PhotoFileFormatEnum,
|
|
10
8
|
OptionNameEnum,
|
|
11
9
|
} from '../theta-repository/options';
|
|
12
10
|
import { getOptions } from '../theta-repository';
|
|
13
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
14
11
|
|
|
15
12
|
const NOTIFY_PROGRESS = 'CONTINUOUS-PROGRESS';
|
|
16
13
|
const NOTIFY_CAPTURING = 'CONTINUOUS-CAPTURING';
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
NotifyController,
|
|
6
|
-
} from '../theta-repository/notify-controller';
|
|
7
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
4
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
8
5
|
|
|
9
6
|
const NOTIFY_NAME = 'LIMITLESS-INTERVAL-CAPTURE-STOP-ERROR';
|
|
10
7
|
const NOTIFY_CAPTURING = 'LIMITLESS-INTERVAL-CAPTURE-CAPTURING';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
NotifyController,
|
|
6
|
-
} from '../theta-repository/notify-controller';
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
4
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
7
5
|
import type { BracketSetting } from '../theta-repository/options';
|
|
8
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
9
6
|
|
|
10
7
|
const NOTIFY_PROGRESS = 'MULTI-BRACKET-PROGRESS';
|
|
11
8
|
const NOTIFY_STOP_ERROR = 'MULTI-BRACKET-STOP-ERROR';
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { CapturingStatusEnum, PhotoCaptureBuilderBase } from './capture';
|
|
2
2
|
import type { FilterEnum, PresetEnum } from '../theta-repository/options';
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
NotifyController,
|
|
8
|
-
} from '../theta-repository/notify-controller';
|
|
9
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
4
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
5
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
6
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
10
7
|
|
|
11
8
|
const NOTIFY_CAPTURING = 'PHOTO-CAPTURING';
|
|
12
9
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
NotifyController,
|
|
6
|
-
} from '../theta-repository/notify-controller';
|
|
7
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
4
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
8
5
|
|
|
9
6
|
const NOTIFY_PROGRESS = 'SHOT-COUNT-SPECIFIED-INTERVAL-PROGRESS';
|
|
10
7
|
const NOTIFY_STOP_ERROR = 'SHOT-COUNT-SPECIFIED-INTERVAL-STOP-ERROR';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
3
|
import type { TimeShiftIntervalEnum } from '../theta-repository/options';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
NotifyController,
|
|
7
|
-
} from '../theta-repository/notify-controller';
|
|
8
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
4
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
5
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
9
6
|
|
|
10
7
|
const NOTIFY_NAME = 'TIME-SHIFT-PROGRESS';
|
|
11
8
|
const NOTIFY_STOP_ERROR = 'TIME-SHIFT-STOP-ERROR';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { CaptureBuilder, CapturingStatusEnum } from './capture';
|
|
2
|
-
import
|
|
2
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
3
3
|
import type { TimeShiftIntervalEnum } from '../theta-repository/options';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
NotifyController,
|
|
7
|
-
} from '../theta-repository/notify-controller';
|
|
8
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
4
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
5
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
9
6
|
|
|
10
7
|
const NOTIFY_NAME = 'TIME-SHIFT-MANUAL-PROGRESS';
|
|
11
8
|
const NOTIFY_STOP_ERROR = 'TIME-SHIFT-MANUAL-STOP-ERROR';
|
|
@@ -4,12 +4,9 @@ import type {
|
|
|
4
4
|
VideoFileFormatEnum,
|
|
5
5
|
} from '../theta-repository/options';
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
NotifyController,
|
|
11
|
-
} from '../theta-repository/notify-controller';
|
|
12
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
7
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
8
|
+
import type { BaseNotify } from '../theta-repository/notify-controller';
|
|
9
|
+
import { NotifyController } from '../theta-repository/notify-controller';
|
|
13
10
|
|
|
14
11
|
const NOTIFY_NAME = 'VIDEO-CAPTURE-STOP-ERROR';
|
|
15
12
|
const NOTIFY_CAPTURING = 'VIDEO-CAPTURE-CAPTURING';
|
package/src/index.tsx
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Spec } from './NativeThetaClientReactNative';
|
|
2
|
+
import NativeThetaClientReactNative from './NativeThetaClientReactNative';
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'- You are not using Expo Go\n';
|
|
4
|
+
const ThetaClientReactNative: Spec = NativeThetaClientReactNative;
|
|
5
|
+
// Ensure TurboModule is loaded on first access (triggers Proxy getter)
|
|
6
|
+
// eslint-disable-next-line no-void -- intentional: evaluate for side effect only
|
|
7
|
+
void ThetaClientReactNative;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
throw new Error(LINKING_ERROR);
|
|
16
|
-
},
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
/** theta frame event name */
|
|
21
|
-
export const THETA_EVENT_NAME = ThetaClientReactNative.DEFAULT_EVENT_NAME;
|
|
9
|
+
/** theta frame event name
|
|
10
|
+
* Note: TurboModule interfaces cannot contain constant properties (Codegen limitation).
|
|
11
|
+
* Therefore, this constant is defined here instead of in the Spec interface,
|
|
12
|
+
* even though Swift's constantsToExport() defines it as DEFAULT_EVENT_NAME.
|
|
13
|
+
*/
|
|
14
|
+
export const THETA_EVENT_NAME = 'ThetaFrameEvent';
|
|
22
15
|
|
|
23
16
|
export * from './theta-repository';
|
|
24
17
|
export * from './theta-repository/options';
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
2
2
|
import type { Options } from './options';
|
|
3
3
|
import type { ThetaState } from './theta-state';
|
|
4
4
|
import type { BaseNotify, NotifyController } from './notify-controller';
|
|
5
5
|
|
|
6
|
-
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
7
|
-
|
|
8
6
|
const NOTIFY_EVENT = 'EVENT-WEBSOCKET-EVENT';
|
|
9
7
|
const NOTIFY_CLOSE = 'EVENT-WEBSOCKET-CLOSE';
|
|
10
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseNotify
|
|
3
|
-
|
|
1
|
+
import ThetaClientReactNative from '../../NativeThetaClientReactNative';
|
|
2
|
+
import type { BaseNotify } from '../notify-controller';
|
|
3
|
+
import { NotifyController } from '../notify-controller';
|
|
4
4
|
|
|
5
5
|
const NOTIFY_PROGRESS = 'CONVERT-VIDEO-FORMATS-PROGRESS';
|
|
6
6
|
const MESSAGE_ERROR_RUNNING = 'convertVideoFormats is running.';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
NativeModules,
|
|
5
|
-
} from 'react-native';
|
|
1
|
+
import type { EmitterSubscription } from 'react-native';
|
|
2
|
+
import { NativeEventEmitter } from 'react-native';
|
|
3
|
+
import ThetaClientReactNative from '../NativeThetaClientReactNative';
|
|
6
4
|
|
|
7
5
|
export interface BaseNotify {
|
|
8
6
|
name: string;
|
|
@@ -55,9 +53,7 @@ export class NotifyController {
|
|
|
55
53
|
callback: (event: BaseNotify) => void
|
|
56
54
|
): EmitterSubscription {
|
|
57
55
|
if (this.eventEmitter == null) {
|
|
58
|
-
this.eventEmitter = new NativeEventEmitter(
|
|
59
|
-
NativeModules.ThetaClientReactNative
|
|
60
|
-
);
|
|
56
|
+
this.eventEmitter = new NativeEventEmitter(ThetaClientReactNative);
|
|
61
57
|
}
|
|
62
58
|
return this.eventEmitter.addListener('ThetaNotify', callback);
|
|
63
59
|
}
|
|
@@ -26,6 +26,7 @@ export * from './option-gps-tag-recording';
|
|
|
26
26
|
export * from './option-image-stitching';
|
|
27
27
|
export * from './option-max-recordable-time';
|
|
28
28
|
export * from './option-microphone-noise-reduction';
|
|
29
|
+
export * from './option-mode-memory';
|
|
29
30
|
export * from './option-mobile-network-setting';
|
|
30
31
|
export * from './option-network-type';
|
|
31
32
|
export * from './option-off-delay-usb';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mode Memory
|
|
3
|
+
*
|
|
4
|
+
* The default setting is "off", preserving the previous behavior.
|
|
5
|
+
* When set to "on", the following shooting parameters will be retained even after power-off or sleep:
|
|
6
|
+
* - Still image stitching process
|
|
7
|
+
* - Exposure program / Aperture / Shutter speed / ISO sensitivity / Exposure compensation
|
|
8
|
+
* - White balance mode / Color temperature setting
|
|
9
|
+
* - Filters
|
|
10
|
+
* - Interval shooting: number of shots / interval
|
|
11
|
+
* - Multi-bracket shooting: number of shots / parameters
|
|
12
|
+
* - Interval composite shooting: duration / intermediate saving
|
|
13
|
+
* - Time-shift shooting settings (excluding shooting order)
|
|
14
|
+
* - Burst shooting options
|
|
15
|
+
* - Geotag data
|
|
16
|
+
*/
|
|
17
|
+
export const ModeMemoryEnum = {
|
|
18
|
+
/** Undefined value */
|
|
19
|
+
UNKNOWN: 'UNKNOWN',
|
|
20
|
+
/** ON */
|
|
21
|
+
ON: 'ON',
|
|
22
|
+
/** OFF */
|
|
23
|
+
OFF: 'OFF',
|
|
24
|
+
} as const;
|
|
25
|
+
|
|
26
|
+
/** type definition of ModeMemoryEnum */
|
|
27
|
+
export type ModeMemoryEnum =
|
|
28
|
+
(typeof ModeMemoryEnum)[keyof typeof ModeMemoryEnum];
|
|
@@ -25,6 +25,7 @@ import type { ImageStitchingEnum } from './option-image-stitching';
|
|
|
25
25
|
import type { MaxRecordableTimeEnum } from './option-max-recordable-time';
|
|
26
26
|
import type { MicrophoneNoiseReductionEnum } from './option-microphone-noise-reduction';
|
|
27
27
|
import type { MobileNetworkSetting } from './option-mobile-network-setting';
|
|
28
|
+
import type { ModeMemoryEnum } from './option-mode-memory';
|
|
28
29
|
import type { NetworkTypeEnum } from './option-network-type';
|
|
29
30
|
import type { OffDelayEnum } from './option-off-delay';
|
|
30
31
|
import type { OffDelayUsbEnum } from './option-off-delay-usb';
|
|
@@ -381,6 +382,8 @@ export const OptionNameEnum = {
|
|
|
381
382
|
MicrophoneNoiseReduction: 'MicrophoneNoiseReduction',
|
|
382
383
|
/** _mobileNetworkSetting */
|
|
383
384
|
MobileNetworkSetting: 'MobileNetworkSetting',
|
|
385
|
+
/** _modeMemory */
|
|
386
|
+
ModeMemory: 'ModeMemory',
|
|
384
387
|
/** networkType */
|
|
385
388
|
NetworkType: 'NetworkType',
|
|
386
389
|
/** offDelay */
|
|
@@ -609,6 +612,8 @@ export type Options = {
|
|
|
609
612
|
microphoneNoiseReduction?: MicrophoneNoiseReductionEnum;
|
|
610
613
|
/** _mobileNetworkSetting */
|
|
611
614
|
mobileNetworkSetting?: MobileNetworkSetting;
|
|
615
|
+
/** _modeMemory */
|
|
616
|
+
modeMemory?: ModeMemoryEnum;
|
|
612
617
|
/** Network type of the camera */
|
|
613
618
|
networkType?: NetworkTypeEnum;
|
|
614
619
|
/** Length of standby time before the camera automatically powers OFF. */
|