theta-client-react-native 1.0.1 → 1.1.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 (119) hide show
  1. package/README.md +6 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +34 -0
  4. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +311 -9
  5. package/ios/ThetaClientReactNative.mm +552 -67
  6. package/lib/commonjs/capture/capture.js +118 -0
  7. package/lib/commonjs/capture/capture.js.map +1 -0
  8. package/lib/commonjs/capture/index.js +39 -0
  9. package/lib/commonjs/capture/index.js.map +1 -0
  10. package/lib/commonjs/capture/photo-capture.js +64 -0
  11. package/lib/commonjs/capture/photo-capture.js.map +1 -0
  12. package/lib/commonjs/capture/video-capture.js +71 -0
  13. package/lib/commonjs/capture/video-capture.js.map +1 -0
  14. package/lib/commonjs/index.js +40 -1041
  15. package/lib/commonjs/index.js.map +1 -1
  16. package/lib/commonjs/theta-repository/access-point.js +23 -0
  17. package/lib/commonjs/theta-repository/access-point.js.map +1 -0
  18. package/lib/commonjs/theta-repository/index.js +72 -0
  19. package/lib/commonjs/theta-repository/index.js.map +1 -0
  20. package/lib/commonjs/theta-repository/options/index.js +28 -0
  21. package/lib/commonjs/theta-repository/options/index.js.map +1 -0
  22. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js +25 -0
  23. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
  24. package/lib/commonjs/theta-repository/options/options.js +462 -0
  25. package/lib/commonjs/theta-repository/options/options.js.map +1 -0
  26. package/lib/commonjs/theta-repository/theta-files.js +23 -0
  27. package/lib/commonjs/theta-repository/theta-files.js.map +1 -0
  28. package/lib/commonjs/theta-repository/theta-info.js +2 -0
  29. package/lib/commonjs/theta-repository/theta-info.js.map +1 -0
  30. package/lib/commonjs/theta-repository/theta-meta.js +2 -0
  31. package/lib/commonjs/theta-repository/theta-meta.js.map +1 -0
  32. package/lib/commonjs/theta-repository/theta-plugin.js +2 -0
  33. package/lib/commonjs/theta-repository/theta-plugin.js.map +1 -0
  34. package/lib/commonjs/theta-repository/theta-repository.js +479 -0
  35. package/lib/commonjs/theta-repository/theta-repository.js.map +1 -0
  36. package/lib/commonjs/theta-repository/theta-state.js +120 -0
  37. package/lib/commonjs/theta-repository/theta-state.js.map +1 -0
  38. package/lib/module/capture/capture.js +111 -0
  39. package/lib/module/capture/capture.js.map +1 -0
  40. package/lib/module/capture/index.js +4 -0
  41. package/lib/module/capture/index.js.map +1 -0
  42. package/lib/module/capture/photo-capture.js +56 -0
  43. package/lib/module/capture/photo-capture.js.map +1 -0
  44. package/lib/module/capture/video-capture.js +63 -0
  45. package/lib/module/capture/video-capture.js.map +1 -0
  46. package/lib/module/index.js +3 -1009
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/theta-repository/access-point.js +16 -0
  49. package/lib/module/theta-repository/access-point.js.map +1 -0
  50. package/lib/module/theta-repository/index.js +7 -0
  51. package/lib/module/theta-repository/index.js.map +1 -0
  52. package/lib/module/theta-repository/options/index.js +3 -0
  53. package/lib/module/theta-repository/options/index.js.map +1 -0
  54. package/lib/module/theta-repository/options/option-white-balance-auto-strength.js +18 -0
  55. package/lib/module/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
  56. package/lib/module/theta-repository/options/options.js +454 -0
  57. package/lib/module/theta-repository/options/options.js.map +1 -0
  58. package/lib/module/theta-repository/theta-files.js +16 -0
  59. package/lib/module/theta-repository/theta-files.js.map +1 -0
  60. package/lib/module/theta-repository/theta-info.js +2 -0
  61. package/lib/module/theta-repository/theta-info.js.map +1 -0
  62. package/lib/module/theta-repository/theta-meta.js +2 -0
  63. package/lib/module/theta-repository/theta-meta.js.map +1 -0
  64. package/lib/module/theta-repository/theta-plugin.js +2 -0
  65. package/lib/module/theta-repository/theta-plugin.js.map +1 -0
  66. package/lib/module/theta-repository/theta-repository.js +437 -0
  67. package/lib/module/theta-repository/theta-repository.js.map +1 -0
  68. package/lib/module/theta-repository/theta-state.js +113 -0
  69. package/lib/module/theta-repository/theta-state.js.map +1 -0
  70. package/lib/typescript/capture/capture.d.ts +71 -0
  71. package/lib/typescript/capture/capture.d.ts.map +1 -0
  72. package/lib/typescript/capture/index.d.ts +4 -0
  73. package/lib/typescript/capture/index.d.ts.map +1 -0
  74. package/lib/typescript/capture/photo-capture.d.ts +38 -0
  75. package/lib/typescript/capture/photo-capture.d.ts.map +1 -0
  76. package/lib/typescript/capture/video-capture.d.ts +43 -0
  77. package/lib/typescript/capture/video-capture.d.ts.map +1 -0
  78. package/lib/typescript/index.d.ts +3 -972
  79. package/lib/typescript/index.d.ts.map +1 -1
  80. package/lib/typescript/theta-repository/access-point.d.ts +33 -0
  81. package/lib/typescript/theta-repository/access-point.d.ts.map +1 -0
  82. package/lib/typescript/theta-repository/index.d.ts +7 -0
  83. package/lib/typescript/theta-repository/index.d.ts.map +1 -0
  84. package/lib/typescript/theta-repository/options/index.d.ts +3 -0
  85. package/lib/typescript/theta-repository/options/index.d.ts.map +1 -0
  86. package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts +18 -0
  87. package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts.map +1 -0
  88. package/lib/typescript/theta-repository/options/options.d.ts +499 -0
  89. package/lib/typescript/theta-repository/options/options.d.ts.map +1 -0
  90. package/lib/typescript/theta-repository/theta-files.d.ts +32 -0
  91. package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -0
  92. package/lib/typescript/theta-repository/theta-info.d.ts +34 -0
  93. package/lib/typescript/theta-repository/theta-info.d.ts.map +1 -0
  94. package/lib/typescript/theta-repository/theta-meta.d.ts +38 -0
  95. package/lib/typescript/theta-repository/theta-meta.d.ts.map +1 -0
  96. package/lib/typescript/theta-repository/theta-plugin.d.ts +26 -0
  97. package/lib/typescript/theta-repository/theta-plugin.d.ts.map +1 -0
  98. package/lib/typescript/theta-repository/theta-repository.d.ts +312 -0
  99. package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -0
  100. package/lib/typescript/theta-repository/theta-state.d.ts +150 -0
  101. package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -0
  102. package/package.json +1 -1
  103. package/src/capture/capture.ts +124 -0
  104. package/src/capture/index.ts +3 -0
  105. package/src/capture/photo-capture.ts +62 -0
  106. package/src/capture/video-capture.ts +69 -0
  107. package/src/index.tsx +3 -1243
  108. package/src/theta-repository/access-point.ts +34 -0
  109. package/src/theta-repository/index.ts +6 -0
  110. package/src/theta-repository/options/index.ts +2 -0
  111. package/src/theta-repository/options/option-white-balance-auto-strength.ts +19 -0
  112. package/src/theta-repository/options/options.ts +554 -0
  113. package/src/theta-repository/theta-files.ts +34 -0
  114. package/src/theta-repository/theta-info.ts +35 -0
  115. package/src/theta-repository/theta-meta.ts +39 -0
  116. package/src/theta-repository/theta-plugin.ts +25 -0
  117. package/src/theta-repository/theta-repository.ts +476 -0
  118. package/src/theta-repository/theta-state.ts +164 -0
  119. package/theta-client-react-native.podspec +1 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * exif information
3
+ */
4
+ export type Exif = {
5
+ /** EXIF Support version */
6
+ exifVersion: string;
7
+ /** File created or updated date and time */
8
+ dateTime: string;
9
+ /** Image width (pixel). Theta X returns null. */
10
+ imageWidth?: number;
11
+ /** Image height (pixel). Theta X returns null. */
12
+ imageLength?: number;
13
+ /** GPS latitude if exists. */
14
+ gpsLatitude?: number;
15
+ /** GPS longitude if exists. */
16
+ gpsLongitude?: number;
17
+ };
18
+
19
+ /**
20
+ * Photo sphere XMP metadata of a still image.
21
+ */
22
+ export type Xmp = {
23
+ /** Compass heading, for the center the image. Theta X returns null. */
24
+ poseHeadingDegrees?: number;
25
+ /** Image width (pixel). */
26
+ fullPanoWidthPixels: number;
27
+ /** Image height (pixel). */
28
+ fullPanoHeightPixels: number;
29
+ };
30
+
31
+ /**
32
+ * metadata of a still image
33
+ */
34
+ export type MetaInfo = {
35
+ /** exif information */
36
+ exif?: Exif;
37
+ /** xmp information */
38
+ xmp?: Xmp;
39
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * plugin information used by ThetaRepository.listPlugins().
3
+ */
4
+ export type PluginInfo = {
5
+ /** Plugin name */
6
+ name: string;
7
+ /** Package name */
8
+ packageName: string;
9
+ /** Plugin version */
10
+ version: string;
11
+ /** Pre-installed plugin or not */
12
+ isPreInstalled: boolean;
13
+ /** Is the plugin running or not */
14
+ isRunning: boolean;
15
+ /** Is the plugin foreground or not */
16
+ isForeground: boolean;
17
+ /** Is the plugin to be started on boot or not */
18
+ isBoot: boolean;
19
+ /** Does the plugin have web server or not */
20
+ hasWebServer: boolean;
21
+ /** Exit status of the plugin */
22
+ exitStatus: string;
23
+ /** Message of the plugin */
24
+ message: string;
25
+ };
@@ -0,0 +1,476 @@
1
+ import { AccessPoint, AuthModeEnum } from './access-point';
2
+ import type { FileTypeEnum, ThetaFiles } from './theta-files';
3
+ import type { ThetaState } from './theta-state';
4
+ import type { ThetaInfo } from './theta-info';
5
+ import type { MetaInfo } from './theta-meta';
6
+ import type { PluginInfo } from './theta-plugin';
7
+
8
+ import { NativeModules } from 'react-native';
9
+ import type { OptionNameEnum, Options, CaptureModeEnum } from './options';
10
+ import { PhotoCaptureBuilder, VideoCaptureBuilder } from '../capture';
11
+ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
12
+
13
+ /**
14
+ * initialize theta client sdk
15
+ *
16
+ * @function initialize
17
+ * @param {string} endPoint optional endpoint of camera
18
+ * @return promise of boolean result
19
+ **/
20
+ export function initialize(endPoint?: string): Promise<boolean> {
21
+ if (!endPoint) {
22
+ endPoint = 'http://192.168.1.1';
23
+ }
24
+ return ThetaClientReactNative.initialize(endPoint);
25
+ }
26
+
27
+ /**
28
+ * Reset all device settings and capture settings.
29
+ * After reset, the camera will be restarted.
30
+ *
31
+ * @function reset
32
+ * @return promise of boolean result
33
+ */
34
+ export function reset(): Promise<boolean> {
35
+ return ThetaClientReactNative.reset();
36
+ }
37
+
38
+ /**
39
+ * Get PhotoCaptureBuilder for take a picture.
40
+ *
41
+ * @function getPhotoCaptureBuilder
42
+ * @return created PhotoCaptureBuilder
43
+ */
44
+ export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
45
+ ThetaClientReactNative.getPhotoCaptureBuilder();
46
+ return new PhotoCaptureBuilder();
47
+ }
48
+
49
+ /**
50
+ * Get PhotoCapture.Builder for capture video.
51
+ *
52
+ * @function getVideoCaptureBuilder
53
+ * @return created VideoCaptureBuilder instance
54
+ */
55
+ export function getVideoCaptureBuilder(): VideoCaptureBuilder {
56
+ ThetaClientReactNative.getVideoCaptureBuilder();
57
+ return new VideoCaptureBuilder();
58
+ }
59
+
60
+ /**
61
+ * Start live preview.
62
+ * preview frame (JPEG DataURL) send THETA_EVENT_NAME event as
63
+ * {
64
+ * "data": "DataURL of JPEG Frame"
65
+ * }
66
+ *
67
+ * @function StartLivePreview
68
+ * @return promise of boolean result
69
+ */
70
+ export function getLivePreview(): Promise<boolean> {
71
+ return ThetaClientReactNative.getLivePreview();
72
+ }
73
+
74
+ /**
75
+ * Stop live preview.
76
+ *
77
+ * @function StopLivePreview
78
+ */
79
+ export function stopLivePreview() {
80
+ ThetaClientReactNative.stopLivePreview();
81
+ }
82
+
83
+ /**
84
+ * Restore setting to THETA
85
+ *
86
+ * @function restoreSettings
87
+ * @return promise of boolean result
88
+ */
89
+ export function restoreSettings(): Promise<boolean> {
90
+ return ThetaClientReactNative.restoreSettings();
91
+ }
92
+
93
+ /**
94
+ * Stop running self-timer.
95
+ *
96
+ * @function stopSelfTimer
97
+ * @return promise of boolean result
98
+ */
99
+ export function stopSelfTimer(): Promise<boolean> {
100
+ return ThetaClientReactNative.stopSelfTimer();
101
+ }
102
+
103
+ /**
104
+ * Converts the movie format of a saved movie.
105
+ *
106
+ * @function convertVideoFormats
107
+ * @param {string} fileUrl URL of a saved movie file to convert
108
+ * @param {boolean} toLowResolution If true generates lower resolution
109
+ * video, otherwise same resolution.
110
+ * @param {boolean} applyTopBottomCorrection apply Top/bottom
111
+ * correction. This parameter is ignored on Theta X.
112
+ * @return promise of URL of a converted movie file.
113
+ */
114
+ export function convertVideoFormats(
115
+ fileUrl: string,
116
+ toLowResolution: boolean,
117
+ applyTopBottomCorrection: boolean
118
+ ): Promise<string> {
119
+ return ThetaClientReactNative.convertVideoFormats(
120
+ fileUrl,
121
+ toLowResolution,
122
+ applyTopBottomCorrection
123
+ );
124
+ }
125
+
126
+ /**
127
+ * Cancels the movie format conversion.
128
+ *
129
+ * @function cancelVideoConvert
130
+ * @return promise of boolean result
131
+ */
132
+ export function cancelVideoConvert(): Promise<boolean> {
133
+ return ThetaClientReactNative.cancelVideoConvert();
134
+ }
135
+
136
+ /**
137
+ * Turns the wireless LAN off.
138
+ *
139
+ * @function finishWlan
140
+ * @return promise of boolean result
141
+ */
142
+ export function finishWlan(): Promise<boolean> {
143
+ return ThetaClientReactNative.finishWlan();
144
+ }
145
+
146
+ /**
147
+ * Registers identification information (UUID) of a BLE device.
148
+ *
149
+ * @function setBluetoothDevice
150
+ * @param {string} uuid UUID of the BLE device to set.
151
+ * @return promise of String result
152
+ */
153
+ export function setBluetoothDevice(uuid: string): Promise<String> {
154
+ return ThetaClientReactNative.setBluetoothDevice(uuid);
155
+ }
156
+
157
+ /**
158
+ * Get basic information about Theta.
159
+ *
160
+ * @function getThetaInfo
161
+ * @return promise of ThetaInfo
162
+ **/
163
+ export function getThetaInfo(): Promise<ThetaInfo> {
164
+ return ThetaClientReactNative.getThetaInfo();
165
+ }
166
+
167
+ /**
168
+ * Get current state of Theta.
169
+ *
170
+ * @function getThetaState
171
+ * @return promise of ThetaState
172
+ **/
173
+ export function getThetaState(): Promise<ThetaState> {
174
+ return ThetaClientReactNative.getThetaState();
175
+ }
176
+
177
+ /**
178
+ * Lists information of images and videos in Theta.
179
+ *
180
+ * @function listFiles
181
+ * @param {FileTypeEnum} fileType Type of the files to be listed.
182
+ * @param {number} startPosition The position of the first file to be
183
+ * returned in the list. 0 represents the first file. If
184
+ * startPosition is larger than the position of the last file, an
185
+ * empty list is returned.
186
+ * @param {number} entryCount Desired number of entries to return. If
187
+ * entryCount is more than the number of remaining files, just
188
+ * return entries of actual remaining files.
189
+ * @return promise with a list of file information and number of totalEntries.
190
+ * see [camera.listFiles](https://github.com/ricohapi/theta-api-specs/blob/main/theta-web-api-v2.1/commands/camera.list_files.md).
191
+ */
192
+ export function listFiles(
193
+ fileTypeEnum: FileTypeEnum,
194
+ startPosition: number = 0,
195
+ entryCount: number
196
+ ): Promise<ThetaFiles> {
197
+ return ThetaClientReactNative.listFiles(
198
+ fileTypeEnum,
199
+ startPosition,
200
+ entryCount
201
+ );
202
+ }
203
+
204
+ /**
205
+ * Delete files in Theta.
206
+ *
207
+ * @function deleteFiles
208
+ * @param {string[]} fileUrls URLs of the file to be deleted.
209
+ * @return promise of boolean result
210
+ */
211
+ export function deleteFiles(fileUrls: string[]): Promise<boolean> {
212
+ return ThetaClientReactNative.deleteFiles(fileUrls);
213
+ }
214
+
215
+ /**
216
+ * Delete all files in Theta.
217
+ *
218
+ * @function deleteAllFiles
219
+ * @return promise of boolean result
220
+ */
221
+ export function deleteAllFiles(): Promise<boolean> {
222
+ return ThetaClientReactNative.deleteAllFiles();
223
+ }
224
+
225
+ /**
226
+ * Delete all image files in Theta.
227
+ *
228
+ * @function deleteAllImageFiles
229
+ * @return promise of boolean result
230
+ */
231
+ export function deleteAllImageFiles(): Promise<boolean> {
232
+ return ThetaClientReactNative.deleteAllImageFiles();
233
+ }
234
+
235
+ /**
236
+ * Delete all video files in Theta.
237
+ *
238
+ * @function deleteAllVideoFiles
239
+ * @return promise of boolean result
240
+ */
241
+ export function deleteAllVideoFiles(): Promise<boolean> {
242
+ return ThetaClientReactNative.deleteAllVideoFiles();
243
+ }
244
+
245
+ /**
246
+ * Acquires the properties and property support specifications for
247
+ * shooting, the camera, etc.
248
+ *
249
+ * @function getOptions
250
+ * @param {OptionNameEnum[]} optionNames List of OptionNameEnum.
251
+ * @return promise of Options acquired
252
+ */
253
+ export function getOptions(optionNames: OptionNameEnum[]): Promise<Options> {
254
+ return ThetaClientReactNative.getOptions(optionNames);
255
+ }
256
+
257
+ /**
258
+ * Property settings for shooting, the camera, etc.
259
+ *
260
+ * @function setOptions
261
+ * @param {Options} options Camera setting options.
262
+ * @return promise of boolean result
263
+ */
264
+ export function setOptions(options: Options): Promise<boolean> {
265
+ return ThetaClientReactNative.setOptions(options);
266
+ }
267
+
268
+ /**
269
+ * Get metadata of a still image
270
+ *
271
+ * @function getMetadata
272
+ * @param {string} fileUrl URL of a still image file to get metadata
273
+ * @return promise of MetaInfo
274
+ */
275
+ export function getMetadata(fileUrl: string): Promise<MetaInfo> {
276
+ return ThetaClientReactNative.getMetadata(fileUrl);
277
+ }
278
+
279
+ /**
280
+ * Acquires the access point list used in client mode.
281
+ *
282
+ * @function listAccessPoints
283
+ * @return promise of AccessPoint list
284
+ */
285
+ export function listAccessPoints(): Promise<AccessPoint[]> {
286
+ return ThetaClientReactNative.listAccessPoints();
287
+ }
288
+
289
+ /**
290
+ * Set access point. IP address is set dynamically.
291
+ *
292
+ * @function setAccessPointDynamically
293
+ * @param {string} ssid SSID of the access point.
294
+ * @param {boolean} ssidStealth true if SSID stealth is enabled.
295
+ * @param {AuthModeEnum} authMode Authentication mode.
296
+ * @param {string} password Password. If authMode is "NONE", pass empty String.
297
+ * @param {number} connectionPriority Connection priority 1 to 5.
298
+ * @return promise of boolean result
299
+ */
300
+ export function setAccessPointDynamically(
301
+ ssid: string,
302
+ ssidStealth: boolean = false,
303
+ authMode: AuthModeEnum = AuthModeEnum.NONE,
304
+ password: string = '',
305
+ connectionPriority: number = 1
306
+ ): Promise<boolean> {
307
+ return ThetaClientReactNative.setAccessPointDynamically(
308
+ ssid,
309
+ ssidStealth,
310
+ authMode,
311
+ password,
312
+ connectionPriority
313
+ );
314
+ }
315
+
316
+ /**
317
+ * Set access point. IP address is set statically.
318
+ *
319
+ * @function setAccessPointStatically
320
+ * @param {string} ssid SSID of the access point.
321
+ * @param {boolean} ssidStealth True if SSID stealth is enabled.
322
+ * @param {AuthModeEnum} authMode Authentication mode.
323
+ * @param {string} password Password. If authMode is "NONE", pass empty String.
324
+ * @param {number} connectionPriority Connection priority 1 to 5.
325
+ * @param {string} ipAddress IP address assigns to Theta.
326
+ * @param {string} subnetMask Subnet mask.
327
+ * @param {string} defaultGateway Default gateway.
328
+ * @return promise of boolean result
329
+ */
330
+ export function setAccessPointStatically(
331
+ ssid: string,
332
+ ssidStealth: boolean = false,
333
+ authMode: AuthModeEnum = AuthModeEnum.NONE,
334
+ password: string = '',
335
+ connectionPriority: number = 1,
336
+ ipAddress: string,
337
+ subnetMask: string,
338
+ defaultGateway: string
339
+ ): Promise<boolean> {
340
+ return ThetaClientReactNative.setAccessPointStatically(
341
+ ssid,
342
+ ssidStealth,
343
+ authMode,
344
+ password,
345
+ connectionPriority,
346
+ ipAddress,
347
+ subnetMask,
348
+ defaultGateway
349
+ );
350
+ }
351
+
352
+ /**
353
+ * Deletes access point information used in client mode.
354
+ *
355
+ * @function deleteAccessPoint
356
+ * @param {string} ssid SSID of the access point to delete.
357
+ * @return promise of boolean result
358
+ */
359
+ export function deleteAccessPoint(ssid: string): Promise<boolean> {
360
+ return ThetaClientReactNative.deleteAccessPoint(ssid);
361
+ }
362
+
363
+ /**
364
+ * Acquires the shooting properties set by the camera._setMySetting command.
365
+ * Just for Theta V and later.
366
+ *
367
+ * @function getMySetting
368
+ * @param captureMode The target shooting mode
369
+ * @returns Options of my setting
370
+ */
371
+ export function getMySetting(captureMode: CaptureModeEnum): Promise<Options> {
372
+ return ThetaClientReactNative.getMySetting(captureMode);
373
+ }
374
+
375
+ /**
376
+ * Acquires the shooting properties set by the camera._setMySetting command.
377
+ * Just for Theta S and SC.
378
+ *
379
+ * @function getMySetting
380
+ * @param optionNames List of option names to acquire
381
+ * @returns Options of my setting
382
+ */
383
+ export function getMySettingFromOldModel(optionNames: OptionNameEnum[]): Promise<Options> {
384
+ return ThetaClientReactNative.getMySettingFromOldModel(optionNames);
385
+ }
386
+
387
+ /**
388
+ * Registers shooting conditions in My Settings
389
+ * @function setMySetting
390
+ * @param captureMode The target shooting mode. RICOH THETA S and SC do not support My Settings in video capture mode.
391
+ * @param options registered to My Settings
392
+ * @returns Promise of boolean result, always true
393
+ */
394
+ export function setMySetting(captureMode: CaptureModeEnum, options: Options): Promise<boolean> {
395
+ return ThetaClientReactNative.setMySetting(captureMode, options);
396
+ }
397
+
398
+ /**
399
+ * Delete shooting conditions in My Settings. Supported just by Theta X and Z1.
400
+ * @param captureMode The target shooting mode
401
+ * @returns Promise of boolean result, always true
402
+ */
403
+ export function deleteMySetting(captureMode: CaptureModeEnum): Promise<boolean> {
404
+ return ThetaClientReactNative.deleteMySetting(captureMode);
405
+ }
406
+
407
+ /**
408
+ * Acquires a list of installed plugins
409
+ * @function listPlugins
410
+ * @return A list of the plugins installed in Theta.
411
+ */
412
+ export function listPlugins(): Promise<PluginInfo[]> {
413
+ return ThetaClientReactNative.listPlugins();
414
+ }
415
+
416
+ /**
417
+ * Sets the installed plugin for boot. Supported just by Theta V.
418
+ * @function setPlugin
419
+ * @param packageName Package name of the target plugin.
420
+ * @return Promise of boolean result, always true.
421
+ */
422
+ export function setPlugin(packageName: string): Promise<boolean> {
423
+ return ThetaClientReactNative.setPlugin(packageName);
424
+ }
425
+
426
+ /**
427
+ * Start the plugin specified by the [packageName].
428
+ * @function startPlugin
429
+ * @param packageName Package name of the target plugin.
430
+ * @return Promise of boolean result, always true.
431
+ */
432
+ export function startPlugin(packageName: string): Promise<boolean> {
433
+ return ThetaClientReactNative.startPlugin(packageName);
434
+ }
435
+
436
+ /**
437
+ * Stop the running plugin.
438
+ * @function stopPlugin
439
+ * @return Promise of boolean result, always true.
440
+ */
441
+ export function stopPlugin(): Promise<boolean> {
442
+ return ThetaClientReactNative.stopPlugin();
443
+ }
444
+
445
+ /**
446
+ * Acquires the license for the installed plugin.
447
+ * @function getPluginLicense
448
+ * @param packageName Package name of the target plugin.
449
+ * @return Promise of string result, HTML string of the license.
450
+ */
451
+ export function getPluginLicense(packageName: string): Promise<string> {
452
+ return ThetaClientReactNative.getPluginLicense(packageName);
453
+ }
454
+
455
+ /**
456
+ * Return the plugin orders. Supported just by Theta X and Z1.
457
+ * @function getPluginOrders
458
+ * @return Promise of string[] result, list of package names of plugins.
459
+ */
460
+ export function getPluginOrders(): Promise<string[]> {
461
+ return ThetaClientReactNative.getPluginOrders();
462
+ }
463
+
464
+ /**
465
+ * Sets the plugin orders. Supported just by Theta X and Z1.
466
+ * @function setPluginOrders
467
+ * @param plugins list of package names of plugins.
468
+ * For Z1, list size must be three. No restrictions for the size for X.
469
+ * When not specifying, set an empty string.
470
+ * If an empty string is placed mid-way, it will be moved to the front.
471
+ * Specifying zero package name will result in an error
472
+ * @return Promise of boolean result, always true.
473
+ */
474
+ export function setPluginOrders(plugins: string[]): Promise<boolean> {
475
+ return ThetaClientReactNative.setPluginOrders(plugins);
476
+ }
@@ -0,0 +1,164 @@
1
+ /** Battery charging state constants */
2
+ export const ChargingStateEnum = {
3
+ /** Charging */
4
+ CHARGING: 'CHARGING',
5
+ /** Charging completed */
6
+ COMPLETED: 'COMPLETED',
7
+ /** Not charging */
8
+ NOT_CHARGING: 'NOT_CHARGING',
9
+ } as const;
10
+
11
+ /** type definition of ChargingStateEnum */
12
+ export type ChargingStateEnum =
13
+ typeof ChargingStateEnum[keyof typeof ChargingStateEnum];
14
+
15
+ /** Capture Status constants */
16
+ export const CaptureStatusEnum = {
17
+ /** Performing continuously shoot */
18
+ SHOOTING: 'SHOOTING',
19
+ /** In standby */
20
+ IDLE: 'IDLE',
21
+ /** Self-timer is operating */
22
+ SELF_TIMER_COUNTDOWN: 'SELF_TIMER_COUNTDOWN',
23
+ /** Performing multi bracket shooting */
24
+ BRACKET_SHOOTING: 'BRACKET_SHOOTING',
25
+ /** Converting post file... */
26
+ CONVERTING: 'CONVERTING',
27
+ /** Performing timeShift shooting */
28
+ TIME_SHIFT_SHOOTING: 'TIME_SHIFT_SHOOTING',
29
+ /** Performing continuous shooting */
30
+ CONTINUOUS_SHOOTING: 'CONTINUOUS_SHOOTING',
31
+ /** Waiting for retrospective video... */
32
+ RETROSPECTIVE_IMAGE_RECORDING: 'RETROSPECTIVE_IMAGE_RECORDING',
33
+ } as const;
34
+
35
+ /** type definition of CaptureStatusEnum */
36
+ export type CaptureStatusEnum =
37
+ typeof CaptureStatusEnum[keyof typeof CaptureStatusEnum];
38
+
39
+ /** Shooting function status constants */
40
+ export const ShootingFunctionEnum = {
41
+ /** normal */
42
+ NORMAL: 'NORMAL',
43
+ /** selfTimer */
44
+ SELF_TIMER: 'SELF_TIMER',
45
+ /** mySetting */
46
+ MY_SETTING: 'MY_SETTING',
47
+ } as const;
48
+
49
+ /** type definition of ShootingFunctionEnum */
50
+ export type ShootingFunctionEnum =
51
+ typeof ShootingFunctionEnum[keyof typeof ShootingFunctionEnum];
52
+
53
+ /** Microphone option constants */
54
+ export const MicrophoneOptionEnum = {
55
+ /** auto */
56
+ AUTO: 'AUTO',
57
+ /** built-in microphone */
58
+ INTERNAL: 'INTERNAL',
59
+ /** external microphone */
60
+ EXTERNAL: 'EXTERNAL',
61
+ } as const;
62
+
63
+ /** type definition of MicrophoneOptionEnum */
64
+ export type MicrophoneOptionEnum =
65
+ typeof MicrophoneOptionEnum[keyof typeof MicrophoneOptionEnum];
66
+
67
+ /** Camera error constants */
68
+ export const CameraErrorEnum = {
69
+ /** Insufficient memory */
70
+ NO_MEMORY: 'NO_MEMORY',
71
+ /** Maximum file number exceeded */
72
+ FILE_NUMBER_OVER: 'FILE_NUMBER_OVER',
73
+ /** Camera clock not set */
74
+ NO_DATA_SETTING: 'NO_DATE_SETTING',
75
+ /** Includes when the card is removed */
76
+ READ_ERROR: 'READ_ERROR',
77
+ /** Unsupported media (SDHC, etc.) */
78
+ NOT_SUPPORTED_MEDIA_TYPE: 'NOT_SUPPORTED_MEDIA_TYPE',
79
+ /** FAT32, etc. */
80
+ NOT_SUPPORTED_FILE_SYSTEM: 'NOT_SUPPORTED_FILE_SYSTEM',
81
+ /** Error warning while mounting */
82
+ MEDIA_NOT_READY: 'MEDIA_NOT_READY',
83
+ /** Battery level warning (firmware update) */
84
+ NOT_ENOUGH_BATTERY: 'NOT_ENOUGH_BATTERY',
85
+ /** Firmware file mismatch warning */
86
+ INVALID_FILE: 'INVALID_FILE',
87
+ /** Plugin start warning (IoT technical standards compliance) */
88
+ PLUGIN_BOOT_ERROR: 'PLUGIN_BOOT_ERROR',
89
+ /**
90
+ * When performing continuous shooting by operating the camera while executing <Delete object>,
91
+ * <Transfer firmware file>, <Install plugin> or <Uninstall plugin> with the WebAPI or MTP.
92
+ */
93
+ IN_PROGRESS_ERROR: 'IN_PROGRESS_ERROR',
94
+ /** Battery inserted + WLAN ON + Video mode + 4K 60fps / 5.7K 10fps / 5.7K 15fps / 5.7K 30fps / 8K 10fps */
95
+ CANNOT_RECORDING: 'CANNOT_RECORDING',
96
+ /** Battery inserted AND Specified battery level or lower + WLAN ON + Video mode + 4K 30fps */
97
+ CANNOT_RECORD_LOWBAT: 'CANNOT_RECORD_LOWBAT',
98
+ /** Shooting hardware failure */
99
+ CAPTURE_HW_FAILED: 'CAPTURE_HW_FAILED',
100
+ /** Software error */
101
+ CAPTURE_SW_FAILED: 'CAPTURE_SW_FAILED',
102
+ /** Internal memory access error */
103
+ INTERNAL_MEM_ACCESS_FAIL: 'INTERNAL_MEM_ACCESS_FAIL',
104
+ /** Undefined error */
105
+ UNEXPECTED_ERROR: 'UNEXPECTED_ERROR',
106
+ /** Charging error */
107
+ BATTERY_CHARGE_FAIL: 'BATTERY_CHARGE_FAIL',
108
+ /** (Board) temperature warning */
109
+ HIGH_TEMPERATURE_WARNING: 'HIGH_TEMPERATURE_WARNING',
110
+ /** (Board) temperature error */
111
+ HIGH_TEMPERATURE: 'HIGH_TEMPERATURE',
112
+ /** Battery temperature error */
113
+ BATTERY_HIGH_TEMPERATURE: 'BATTERY_HIGH_TEMPERATURE',
114
+ /** Electronic compass error */
115
+ COMPASS_CALIBRATION: 'COMPASS_CALIBRATION',
116
+ } as const;
117
+
118
+ /** type definition of CameraErrorEnum */
119
+ export type CameraErrorEnum =
120
+ typeof CameraErrorEnum[keyof typeof CameraErrorEnum];
121
+
122
+ /** Mutable values representing Theta status. */
123
+ export type ThetaState = {
124
+ /** Fingerprint (unique identifier) of the current camera state */
125
+ fingerprint: string;
126
+ /** Battery level between 0.0 and 1.0 */
127
+ batteryLevel: number;
128
+ /** Storage URI */
129
+ storageUri: string | null;
130
+ /** Storage ID */
131
+ storageID: string | null;
132
+ /** Continuously shoots state */
133
+ captureStatus: CaptureStatusEnum;
134
+ /** Recorded time of movie (seconds) */
135
+ recordedTime: number;
136
+ /** Recordable time of movie (seconds) */
137
+ recordableTime: number;
138
+ /** Number of still images captured during continuous shooting, Unit: images */
139
+ capturedPictures: number | null;
140
+ /** Elapsed time for interval composite shooting (sec) */
141
+ compositeShootingElapsedTime: number | null;
142
+ /** URL of the last saved file */
143
+ latestFileUrl: string;
144
+ /** Charging state */
145
+ chargingState: ChargingStateEnum;
146
+ /** API version currently set (1: v2.0, 2: v2.1) */
147
+ apiVersion: number;
148
+ /** Plugin running state (true: running, false: stop) */
149
+ isPluginRunning: boolean | null;
150
+ /** Plugin web server state (true: enabled, false: disabled) */
151
+ isPluginWebServer: boolean | null;
152
+ /** Shooting function status*/
153
+ function: ShootingFunctionEnum;
154
+ /** My setting changed state */
155
+ isMySettingChanged: boolean | null;
156
+ /** Identifies the microphone used while recording video */
157
+ currentMicrophone: MicrophoneOptionEnum | null;
158
+ /** true if record to SD card */
159
+ isSdCard: boolean;
160
+ /** Error information of the camera */
161
+ cameraError: Array<CameraErrorEnum> | null;
162
+ /** true: Battery inserted; false: Battery not inserted */
163
+ isBatteryInsert: boolean | null;
164
+ };