theta-client-react-native 1.0.2 → 1.2.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 (225) 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 +409 -0
  4. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +700 -24
  5. package/ios/ThetaClientReactNative.h +6 -0
  6. package/ios/ThetaClientReactNative.mm +1661 -183
  7. package/lib/commonjs/capture/capture.js +118 -0
  8. package/lib/commonjs/capture/capture.js.map +1 -0
  9. package/lib/commonjs/capture/index.js +50 -0
  10. package/lib/commonjs/capture/index.js.map +1 -0
  11. package/lib/commonjs/capture/notify.js +12 -0
  12. package/lib/commonjs/capture/notify.js.map +1 -0
  13. package/lib/commonjs/capture/photo-capture.js +64 -0
  14. package/lib/commonjs/capture/photo-capture.js.map +1 -0
  15. package/lib/commonjs/capture/time-shift-capture.js +91 -0
  16. package/lib/commonjs/capture/time-shift-capture.js.map +1 -0
  17. package/lib/commonjs/capture/video-capture.js +71 -0
  18. package/lib/commonjs/capture/video-capture.js.map +1 -0
  19. package/lib/commonjs/index.js +40 -1041
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/theta-repository/access-point.js +23 -0
  22. package/lib/commonjs/theta-repository/access-point.js.map +1 -0
  23. package/lib/commonjs/theta-repository/digest-auth.js +2 -0
  24. package/lib/commonjs/theta-repository/digest-auth.js.map +1 -0
  25. package/lib/commonjs/theta-repository/index.js +105 -0
  26. package/lib/commonjs/theta-repository/index.js.map +1 -0
  27. package/lib/commonjs/theta-repository/options/index.js +138 -0
  28. package/lib/commonjs/theta-repository/options/index.js.map +1 -0
  29. package/lib/commonjs/theta-repository/options/option-camera-control-source.js +29 -0
  30. package/lib/commonjs/theta-repository/options/option-camera-control-source.js.map +1 -0
  31. package/lib/commonjs/theta-repository/options/option-camera-mode.js +26 -0
  32. package/lib/commonjs/theta-repository/options/option-camera-mode.js.map +1 -0
  33. package/lib/commonjs/theta-repository/options/option-network-type.js +26 -0
  34. package/lib/commonjs/theta-repository/options/option-network-type.js.map +1 -0
  35. package/lib/commonjs/theta-repository/options/option-power-saving.js +24 -0
  36. package/lib/commonjs/theta-repository/options/option-power-saving.js.map +1 -0
  37. package/lib/commonjs/theta-repository/options/option-preview-format.js +32 -0
  38. package/lib/commonjs/theta-repository/options/option-preview-format.js.map +1 -0
  39. package/lib/commonjs/theta-repository/options/option-proxy.js +2 -0
  40. package/lib/commonjs/theta-repository/options/option-proxy.js.map +1 -0
  41. package/lib/commonjs/theta-repository/options/option-shooting-method.js +41 -0
  42. package/lib/commonjs/theta-repository/options/option-shooting-method.js.map +1 -0
  43. package/lib/commonjs/theta-repository/options/option-shutter-speed.js +302 -0
  44. package/lib/commonjs/theta-repository/options/option-shutter-speed.js.map +1 -0
  45. package/lib/commonjs/theta-repository/options/option-time-shift.js +43 -0
  46. package/lib/commonjs/theta-repository/options/option-time-shift.js.map +1 -0
  47. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js +25 -0
  48. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
  49. package/lib/commonjs/theta-repository/options/option-wlan-frequency.js +22 -0
  50. package/lib/commonjs/theta-repository/options/option-wlan-frequency.js.map +1 -0
  51. package/lib/commonjs/theta-repository/options/options.js +490 -0
  52. package/lib/commonjs/theta-repository/options/options.js.map +1 -0
  53. package/lib/commonjs/theta-repository/theta-config.js +6 -0
  54. package/lib/commonjs/theta-repository/theta-config.js.map +1 -0
  55. package/lib/commonjs/theta-repository/theta-files.js +35 -0
  56. package/lib/commonjs/theta-repository/theta-files.js.map +1 -0
  57. package/lib/commonjs/theta-repository/theta-info.js +2 -0
  58. package/lib/commonjs/theta-repository/theta-info.js.map +1 -0
  59. package/lib/commonjs/theta-repository/theta-meta.js +2 -0
  60. package/lib/commonjs/theta-repository/theta-meta.js.map +1 -0
  61. package/lib/commonjs/theta-repository/theta-plugin.js +2 -0
  62. package/lib/commonjs/theta-repository/theta-plugin.js.map +1 -0
  63. package/lib/commonjs/theta-repository/theta-repository.js +510 -0
  64. package/lib/commonjs/theta-repository/theta-repository.js.map +1 -0
  65. package/lib/commonjs/theta-repository/theta-state.js +120 -0
  66. package/lib/commonjs/theta-repository/theta-state.js.map +1 -0
  67. package/lib/commonjs/theta-repository/theta-timeout.js +2 -0
  68. package/lib/commonjs/theta-repository/theta-timeout.js.map +1 -0
  69. package/lib/module/capture/capture.js +111 -0
  70. package/lib/module/capture/capture.js.map +1 -0
  71. package/lib/module/capture/index.js +5 -0
  72. package/lib/module/capture/index.js.map +1 -0
  73. package/lib/module/capture/notify.js +6 -0
  74. package/lib/module/capture/notify.js.map +1 -0
  75. package/lib/module/capture/photo-capture.js +56 -0
  76. package/lib/module/capture/photo-capture.js.map +1 -0
  77. package/lib/module/capture/time-shift-capture.js +83 -0
  78. package/lib/module/capture/time-shift-capture.js.map +1 -0
  79. package/lib/module/capture/video-capture.js +63 -0
  80. package/lib/module/capture/video-capture.js.map +1 -0
  81. package/lib/module/index.js +3 -1009
  82. package/lib/module/index.js.map +1 -1
  83. package/lib/module/theta-repository/access-point.js +16 -0
  84. package/lib/module/theta-repository/access-point.js.map +1 -0
  85. package/lib/module/theta-repository/digest-auth.js +2 -0
  86. package/lib/module/theta-repository/digest-auth.js.map +1 -0
  87. package/lib/module/theta-repository/index.js +10 -0
  88. package/lib/module/theta-repository/index.js.map +1 -0
  89. package/lib/module/theta-repository/options/index.js +13 -0
  90. package/lib/module/theta-repository/options/index.js.map +1 -0
  91. package/lib/module/theta-repository/options/option-camera-control-source.js +22 -0
  92. package/lib/module/theta-repository/options/option-camera-control-source.js.map +1 -0
  93. package/lib/module/theta-repository/options/option-camera-mode.js +19 -0
  94. package/lib/module/theta-repository/options/option-camera-mode.js.map +1 -0
  95. package/lib/module/theta-repository/options/option-network-type.js +19 -0
  96. package/lib/module/theta-repository/options/option-network-type.js.map +1 -0
  97. package/lib/module/theta-repository/options/option-power-saving.js +17 -0
  98. package/lib/module/theta-repository/options/option-power-saving.js.map +1 -0
  99. package/lib/module/theta-repository/options/option-preview-format.js +25 -0
  100. package/lib/module/theta-repository/options/option-preview-format.js.map +1 -0
  101. package/lib/module/theta-repository/options/option-proxy.js +2 -0
  102. package/lib/module/theta-repository/options/option-proxy.js.map +1 -0
  103. package/lib/module/theta-repository/options/option-shooting-method.js +34 -0
  104. package/lib/module/theta-repository/options/option-shooting-method.js.map +1 -0
  105. package/lib/module/theta-repository/options/option-shutter-speed.js +295 -0
  106. package/lib/module/theta-repository/options/option-shutter-speed.js.map +1 -0
  107. package/lib/module/theta-repository/options/option-time-shift.js +36 -0
  108. package/lib/module/theta-repository/options/option-time-shift.js.map +1 -0
  109. package/lib/module/theta-repository/options/option-white-balance-auto-strength.js +18 -0
  110. package/lib/module/theta-repository/options/option-white-balance-auto-strength.js.map +1 -0
  111. package/lib/module/theta-repository/options/option-wlan-frequency.js +15 -0
  112. package/lib/module/theta-repository/options/option-wlan-frequency.js.map +1 -0
  113. package/lib/module/theta-repository/options/options.js +482 -0
  114. package/lib/module/theta-repository/options/options.js.map +1 -0
  115. package/lib/module/theta-repository/theta-config.js +2 -0
  116. package/lib/module/theta-repository/theta-config.js.map +1 -0
  117. package/lib/module/theta-repository/theta-files.js +28 -0
  118. package/lib/module/theta-repository/theta-files.js.map +1 -0
  119. package/lib/module/theta-repository/theta-info.js +2 -0
  120. package/lib/module/theta-repository/theta-info.js.map +1 -0
  121. package/lib/module/theta-repository/theta-meta.js +2 -0
  122. package/lib/module/theta-repository/theta-meta.js.map +1 -0
  123. package/lib/module/theta-repository/theta-plugin.js +2 -0
  124. package/lib/module/theta-repository/theta-plugin.js.map +1 -0
  125. package/lib/module/theta-repository/theta-repository.js +466 -0
  126. package/lib/module/theta-repository/theta-repository.js.map +1 -0
  127. package/lib/module/theta-repository/theta-state.js +113 -0
  128. package/lib/module/theta-repository/theta-state.js.map +1 -0
  129. package/lib/module/theta-repository/theta-timeout.js +2 -0
  130. package/lib/module/theta-repository/theta-timeout.js.map +1 -0
  131. package/lib/typescript/capture/capture.d.ts +71 -0
  132. package/lib/typescript/capture/capture.d.ts.map +1 -0
  133. package/lib/typescript/capture/index.d.ts +5 -0
  134. package/lib/typescript/capture/index.d.ts.map +1 -0
  135. package/lib/typescript/capture/notify.d.ts +13 -0
  136. package/lib/typescript/capture/notify.d.ts.map +1 -0
  137. package/lib/typescript/capture/photo-capture.d.ts +38 -0
  138. package/lib/typescript/capture/photo-capture.d.ts.map +1 -0
  139. package/lib/typescript/capture/time-shift-capture.d.ts +44 -0
  140. package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -0
  141. package/lib/typescript/capture/video-capture.d.ts +43 -0
  142. package/lib/typescript/capture/video-capture.d.ts.map +1 -0
  143. package/lib/typescript/index.d.ts +3 -972
  144. package/lib/typescript/index.d.ts.map +1 -1
  145. package/lib/typescript/theta-repository/access-point.d.ts +36 -0
  146. package/lib/typescript/theta-repository/access-point.d.ts.map +1 -0
  147. package/lib/typescript/theta-repository/digest-auth.d.ts +17 -0
  148. package/lib/typescript/theta-repository/digest-auth.d.ts.map +1 -0
  149. package/lib/typescript/theta-repository/index.d.ts +10 -0
  150. package/lib/typescript/theta-repository/index.d.ts.map +1 -0
  151. package/lib/typescript/theta-repository/options/index.d.ts +13 -0
  152. package/lib/typescript/theta-repository/options/index.d.ts.map +1 -0
  153. package/lib/typescript/theta-repository/options/option-camera-control-source.d.ts +22 -0
  154. package/lib/typescript/theta-repository/options/option-camera-control-source.d.ts.map +1 -0
  155. package/lib/typescript/theta-repository/options/option-camera-mode.d.ts +19 -0
  156. package/lib/typescript/theta-repository/options/option-camera-mode.d.ts.map +1 -0
  157. package/lib/typescript/theta-repository/options/option-network-type.d.ts +19 -0
  158. package/lib/typescript/theta-repository/options/option-network-type.d.ts.map +1 -0
  159. package/lib/typescript/theta-repository/options/option-power-saving.d.ts +16 -0
  160. package/lib/typescript/theta-repository/options/option-power-saving.d.ts.map +1 -0
  161. package/lib/typescript/theta-repository/options/option-preview-format.d.ts +25 -0
  162. package/lib/typescript/theta-repository/options/option-preview-format.d.ts.map +1 -0
  163. package/lib/typescript/theta-repository/options/option-proxy.d.ts +23 -0
  164. package/lib/typescript/theta-repository/options/option-proxy.d.ts.map +1 -0
  165. package/lib/typescript/theta-repository/options/option-shooting-method.d.ts +33 -0
  166. package/lib/typescript/theta-repository/options/option-shooting-method.d.ts.map +1 -0
  167. package/lib/typescript/theta-repository/options/option-shutter-speed.d.ts +295 -0
  168. package/lib/typescript/theta-repository/options/option-shutter-speed.d.ts.map +1 -0
  169. package/lib/typescript/theta-repository/options/option-time-shift.d.ts +54 -0
  170. package/lib/typescript/theta-repository/options/option-time-shift.d.ts.map +1 -0
  171. package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts +18 -0
  172. package/lib/typescript/theta-repository/options/option-white-balance-auto-strength.d.ts.map +1 -0
  173. package/lib/typescript/theta-repository/options/option-wlan-frequency.d.ts +15 -0
  174. package/lib/typescript/theta-repository/options/option-wlan-frequency.d.ts.map +1 -0
  175. package/lib/typescript/theta-repository/options/options.d.ts +566 -0
  176. package/lib/typescript/theta-repository/options/options.d.ts.map +1 -0
  177. package/lib/typescript/theta-repository/theta-config.d.ts +20 -0
  178. package/lib/typescript/theta-repository/theta-config.d.ts.map +1 -0
  179. package/lib/typescript/theta-repository/theta-files.d.ts +45 -0
  180. package/lib/typescript/theta-repository/theta-files.d.ts.map +1 -0
  181. package/lib/typescript/theta-repository/theta-info.d.ts +34 -0
  182. package/lib/typescript/theta-repository/theta-info.d.ts.map +1 -0
  183. package/lib/typescript/theta-repository/theta-meta.d.ts +38 -0
  184. package/lib/typescript/theta-repository/theta-meta.d.ts.map +1 -0
  185. package/lib/typescript/theta-repository/theta-plugin.d.ts +26 -0
  186. package/lib/typescript/theta-repository/theta-plugin.d.ts.map +1 -0
  187. package/lib/typescript/theta-repository/theta-repository.d.ts +333 -0
  188. package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -0
  189. package/lib/typescript/theta-repository/theta-state.d.ts +150 -0
  190. package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -0
  191. package/lib/typescript/theta-repository/theta-timeout.d.ts +22 -0
  192. package/lib/typescript/theta-repository/theta-timeout.d.ts.map +1 -0
  193. package/package.json +1 -1
  194. package/src/capture/capture.ts +124 -0
  195. package/src/capture/index.ts +4 -0
  196. package/src/capture/notify.ts +27 -0
  197. package/src/capture/photo-capture.ts +62 -0
  198. package/src/capture/time-shift-capture.ts +99 -0
  199. package/src/capture/video-capture.ts +69 -0
  200. package/src/index.tsx +3 -1243
  201. package/src/theta-repository/access-point.ts +38 -0
  202. package/src/theta-repository/digest-auth.ts +16 -0
  203. package/src/theta-repository/index.ts +9 -0
  204. package/src/theta-repository/options/index.ts +13 -0
  205. package/src/theta-repository/options/option-camera-control-source.ts +24 -0
  206. package/src/theta-repository/options/option-camera-mode.ts +20 -0
  207. package/src/theta-repository/options/option-network-type.ts +20 -0
  208. package/src/theta-repository/options/option-power-saving.ts +18 -0
  209. package/src/theta-repository/options/option-preview-format.ts +27 -0
  210. package/src/theta-repository/options/option-proxy.ts +22 -0
  211. package/src/theta-repository/options/option-shooting-method.ts +36 -0
  212. package/src/theta-repository/options/option-shutter-speed.ts +360 -0
  213. package/src/theta-repository/options/option-time-shift.ts +59 -0
  214. package/src/theta-repository/options/option-white-balance-auto-strength.ts +19 -0
  215. package/src/theta-repository/options/option-wlan-frequency.ts +16 -0
  216. package/src/theta-repository/options/options.ts +622 -0
  217. package/src/theta-repository/theta-config.ts +20 -0
  218. package/src/theta-repository/theta-files.ts +49 -0
  219. package/src/theta-repository/theta-info.ts +35 -0
  220. package/src/theta-repository/theta-meta.ts +39 -0
  221. package/src/theta-repository/theta-plugin.ts +25 -0
  222. package/src/theta-repository/theta-repository.ts +527 -0
  223. package/src/theta-repository/theta-state.ts +164 -0
  224. package/src/theta-repository/theta-timeout.ts +21 -0
  225. package/theta-client-react-native.podspec +1 -1
@@ -0,0 +1,35 @@
1
+ /** Static attributes of Theta. */
2
+ export type ThetaInfo = {
3
+ /** Manufacturer name */
4
+ manufacturer: string;
5
+ /** Theta model name */
6
+ model: string;
7
+ /** Theta serial number */
8
+ serialNumber: string;
9
+ /** MAC address of wireless LAN (RICOH THETA V firmware v2.11.1 or later) */
10
+ wlanMacAddress: string | null;
11
+ /** MAC address of Bluetooth (RICOH THETA V firmware v2.11.1 or later) */
12
+ bluetoothMacAddress: string | null;
13
+ /** Theta firmware version */
14
+ firmwareVersion: string;
15
+ /* URL of the support page */
16
+ supportUrl: string;
17
+ /** true if Theta has GPS. */
18
+ hasGps: boolean;
19
+ /** true if Theta has Gyroscope */
20
+ hasGyro: boolean;
21
+ /** Number of seconds since Theta boot */
22
+ uptime: number;
23
+ /** List of supported APIs */
24
+ api: string[];
25
+ /** Endpoint information */
26
+ endpoints: EndPoint;
27
+ /** List of supported APIs (1: v2.0, 2: v2.1) */
28
+ apiLevel: number[];
29
+ };
30
+
31
+ /** endpoint information */
32
+ export type EndPoint = {
33
+ httpPort: number;
34
+ httpUpdatesPort: number;
35
+ };
@@ -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,527 @@
1
+ import { AccessPoint, AuthModeEnum } from './access-point';
2
+ import type { FileTypeEnum, StorageEnum, 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 {
10
+ OptionNameEnum,
11
+ Options,
12
+ CaptureModeEnum,
13
+ Proxy,
14
+ } from './options';
15
+ import {
16
+ PhotoCaptureBuilder,
17
+ VideoCaptureBuilder,
18
+ TimeShiftCaptureBuilder,
19
+ } from '../capture';
20
+ import type { ThetaConfig } from './theta-config';
21
+ import type { ThetaTimeout } from './theta-timeout';
22
+ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
23
+
24
+ /**
25
+ * initialize theta client sdk
26
+ *
27
+ * @function initialize
28
+ * @param {string} endPoint optional endpoint of camera
29
+ * @param {ThetaConfig} config Configuration of initialize. If null, get from THETA.
30
+ * @param {ThetaTimeout} timeout Timeout of HTTP call.
31
+ * @return promise of boolean result
32
+ **/
33
+ export function initialize(
34
+ endPoint: string = 'http://192.168.1.1',
35
+ config?: ThetaConfig,
36
+ timeout?: ThetaTimeout
37
+ ): Promise<boolean> {
38
+ return ThetaClientReactNative.initialize(endPoint, config, timeout);
39
+ }
40
+
41
+ /**
42
+ * Returns whether it is initialized or not.
43
+ *
44
+ * @function isInitialized
45
+ * @return promise of boolean result
46
+ **/
47
+ export function isInitialized(): Promise<boolean> {
48
+ return ThetaClientReactNative.isInitialized();
49
+ }
50
+
51
+ /**
52
+ * Reset all device settings and capture settings.
53
+ * After reset, the camera will be restarted.
54
+ *
55
+ * @function reset
56
+ * @return promise of boolean result
57
+ */
58
+ export function reset(): Promise<boolean> {
59
+ return ThetaClientReactNative.reset();
60
+ }
61
+
62
+ /**
63
+ * Get PhotoCaptureBuilder for take a picture.
64
+ *
65
+ * @function getPhotoCaptureBuilder
66
+ * @return created PhotoCaptureBuilder
67
+ */
68
+ export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
69
+ ThetaClientReactNative.getPhotoCaptureBuilder();
70
+ return new PhotoCaptureBuilder();
71
+ }
72
+
73
+ /**
74
+ * Get TimeShiftCaptureBuilder for time-shift.
75
+ *
76
+ * @function getTimeShiftCaptureBuilder
77
+ * @return created TimeShiftCaptureBuilder
78
+ */
79
+ export function getTimeShiftCaptureBuilder(): TimeShiftCaptureBuilder {
80
+ ThetaClientReactNative.getTimeShiftCaptureBuilder();
81
+ return new TimeShiftCaptureBuilder();
82
+ }
83
+
84
+ /**
85
+ * Get PhotoCapture.Builder for capture video.
86
+ *
87
+ * @function getVideoCaptureBuilder
88
+ * @return created VideoCaptureBuilder instance
89
+ */
90
+ export function getVideoCaptureBuilder(): VideoCaptureBuilder {
91
+ ThetaClientReactNative.getVideoCaptureBuilder();
92
+ return new VideoCaptureBuilder();
93
+ }
94
+
95
+ /**
96
+ * Start live preview.
97
+ * preview frame (JPEG DataURL) send THETA_EVENT_NAME event as
98
+ * {
99
+ * "data": "DataURL of JPEG Frame"
100
+ * }
101
+ *
102
+ * @function StartLivePreview
103
+ * @return promise of boolean result
104
+ */
105
+ export function getLivePreview(): Promise<boolean> {
106
+ return ThetaClientReactNative.getLivePreview();
107
+ }
108
+
109
+ /**
110
+ * Stop live preview.
111
+ *
112
+ * @function StopLivePreview
113
+ */
114
+ export function stopLivePreview() {
115
+ ThetaClientReactNative.stopLivePreview();
116
+ }
117
+
118
+ /**
119
+ * Restore setting to THETA
120
+ *
121
+ * @function restoreSettings
122
+ * @return promise of boolean result
123
+ */
124
+ export function restoreSettings(): Promise<boolean> {
125
+ return ThetaClientReactNative.restoreSettings();
126
+ }
127
+
128
+ /**
129
+ * Stop running self-timer.
130
+ *
131
+ * @function stopSelfTimer
132
+ * @return promise of boolean result
133
+ */
134
+ export function stopSelfTimer(): Promise<boolean> {
135
+ return ThetaClientReactNative.stopSelfTimer();
136
+ }
137
+
138
+ /**
139
+ * Converts the movie format of a saved movie.
140
+ *
141
+ * @function convertVideoFormats
142
+ * @param {string} fileUrl URL of a saved movie file to convert
143
+ * @param {boolean} toLowResolution If true generates lower resolution
144
+ * video, otherwise same resolution.
145
+ * @param {boolean} applyTopBottomCorrection apply Top/bottom
146
+ * correction. This parameter is ignored on Theta X.
147
+ * @return promise of URL of a converted movie file.
148
+ */
149
+ export function convertVideoFormats(
150
+ fileUrl: string,
151
+ toLowResolution: boolean,
152
+ applyTopBottomCorrection: boolean
153
+ ): Promise<string> {
154
+ return ThetaClientReactNative.convertVideoFormats(
155
+ fileUrl,
156
+ toLowResolution,
157
+ applyTopBottomCorrection
158
+ );
159
+ }
160
+
161
+ /**
162
+ * Cancels the movie format conversion.
163
+ *
164
+ * @function cancelVideoConvert
165
+ * @return promise of boolean result
166
+ */
167
+ export function cancelVideoConvert(): Promise<boolean> {
168
+ return ThetaClientReactNative.cancelVideoConvert();
169
+ }
170
+
171
+ /**
172
+ * Turns the wireless LAN off.
173
+ *
174
+ * @function finishWlan
175
+ * @return promise of boolean result
176
+ */
177
+ export function finishWlan(): Promise<boolean> {
178
+ return ThetaClientReactNative.finishWlan();
179
+ }
180
+
181
+ /**
182
+ * Registers identification information (UUID) of a BLE device.
183
+ *
184
+ * @function setBluetoothDevice
185
+ * @param {string} uuid UUID of the BLE device to set.
186
+ * @return promise of String result
187
+ */
188
+ export function setBluetoothDevice(uuid: string): Promise<String> {
189
+ return ThetaClientReactNative.setBluetoothDevice(uuid);
190
+ }
191
+
192
+ /**
193
+ * Get basic information about Theta.
194
+ *
195
+ * @function getThetaInfo
196
+ * @return promise of ThetaInfo
197
+ **/
198
+ export function getThetaInfo(): Promise<ThetaInfo> {
199
+ return ThetaClientReactNative.getThetaInfo();
200
+ }
201
+
202
+ /**
203
+ * Get current state of Theta.
204
+ *
205
+ * @function getThetaState
206
+ * @return promise of ThetaState
207
+ **/
208
+ export function getThetaState(): Promise<ThetaState> {
209
+ return ThetaClientReactNative.getThetaState();
210
+ }
211
+
212
+ /**
213
+ * Lists information of images and videos in Theta.
214
+ *
215
+ * @function listFiles
216
+ * @param {FileTypeEnum} fileType Type of the files to be listed.
217
+ * @param {number} startPosition The position of the first file to be
218
+ * returned in the list. 0 represents the first file. If
219
+ * startPosition is larger than the position of the last file, an
220
+ * empty list is returned.
221
+ * @param {number} entryCount Desired number of entries to return. If
222
+ * entryCount is more than the number of remaining files, just
223
+ * return entries of actual remaining files.
224
+ * @param {StorageEnum} storage Desired storage. If omitted, return current storage. (RICOH THETA X Version 2.00.0 or later)
225
+ * @return promise with a list of file information and number of totalEntries.
226
+ * see [camera.listFiles](https://github.com/ricohapi/theta-api-specs/blob/main/theta-web-api-v2.1/commands/camera.list_files.md).
227
+ */
228
+ export function listFiles(
229
+ fileTypeEnum: FileTypeEnum,
230
+ startPosition: number = 0,
231
+ entryCount: number,
232
+ storage?: StorageEnum
233
+ ): Promise<ThetaFiles> {
234
+ return ThetaClientReactNative.listFiles(
235
+ fileTypeEnum,
236
+ startPosition,
237
+ entryCount,
238
+ storage
239
+ );
240
+ }
241
+
242
+ /**
243
+ * Delete files in Theta.
244
+ *
245
+ * @function deleteFiles
246
+ * @param {string[]} fileUrls URLs of the file to be deleted.
247
+ * @return promise of boolean result
248
+ */
249
+ export function deleteFiles(fileUrls: string[]): Promise<boolean> {
250
+ return ThetaClientReactNative.deleteFiles(fileUrls);
251
+ }
252
+
253
+ /**
254
+ * Delete all files in Theta.
255
+ *
256
+ * @function deleteAllFiles
257
+ * @return promise of boolean result
258
+ */
259
+ export function deleteAllFiles(): Promise<boolean> {
260
+ return ThetaClientReactNative.deleteAllFiles();
261
+ }
262
+
263
+ /**
264
+ * Delete all image files in Theta.
265
+ *
266
+ * @function deleteAllImageFiles
267
+ * @return promise of boolean result
268
+ */
269
+ export function deleteAllImageFiles(): Promise<boolean> {
270
+ return ThetaClientReactNative.deleteAllImageFiles();
271
+ }
272
+
273
+ /**
274
+ * Delete all video files in Theta.
275
+ *
276
+ * @function deleteAllVideoFiles
277
+ * @return promise of boolean result
278
+ */
279
+ export function deleteAllVideoFiles(): Promise<boolean> {
280
+ return ThetaClientReactNative.deleteAllVideoFiles();
281
+ }
282
+
283
+ /**
284
+ * Acquires the properties and property support specifications for
285
+ * shooting, the camera, etc.
286
+ *
287
+ * @function getOptions
288
+ * @param {OptionNameEnum[]} optionNames List of OptionNameEnum.
289
+ * @return promise of Options acquired
290
+ */
291
+ export function getOptions(optionNames: OptionNameEnum[]): Promise<Options> {
292
+ return ThetaClientReactNative.getOptions(optionNames);
293
+ }
294
+
295
+ /**
296
+ * Property settings for shooting, the camera, etc.
297
+ *
298
+ * @function setOptions
299
+ * @param {Options} options Camera setting options.
300
+ * @return promise of boolean result
301
+ */
302
+ export function setOptions(options: Options): Promise<boolean> {
303
+ return ThetaClientReactNative.setOptions(options);
304
+ }
305
+
306
+ /**
307
+ * Get metadata of a still image
308
+ *
309
+ * @function getMetadata
310
+ * @param {string} fileUrl URL of a still image file to get metadata
311
+ * @return promise of MetaInfo
312
+ */
313
+ export function getMetadata(fileUrl: string): Promise<MetaInfo> {
314
+ return ThetaClientReactNative.getMetadata(fileUrl);
315
+ }
316
+
317
+ /**
318
+ * Acquires the access point list used in client mode.
319
+ *
320
+ * @function listAccessPoints
321
+ * @return promise of AccessPoint list
322
+ */
323
+ export function listAccessPoints(): Promise<AccessPoint[]> {
324
+ return ThetaClientReactNative.listAccessPoints();
325
+ }
326
+
327
+ /**
328
+ * Set access point. IP address is set dynamically.
329
+ *
330
+ * @function setAccessPointDynamically
331
+ * @param {string} ssid SSID of the access point.
332
+ * @param {boolean} ssidStealth true if SSID stealth is enabled.
333
+ * @param {AuthModeEnum} authMode Authentication mode.
334
+ * @param {string} password Password. If authMode is "NONE", pass empty String.
335
+ * @param {number} connectionPriority Connection priority 1 to 5.
336
+ * @param {Proxy} proxy Proxy information to be used for the access point.
337
+ * @return promise of boolean result
338
+ */
339
+ export function setAccessPointDynamically(
340
+ ssid: string,
341
+ ssidStealth: boolean = false,
342
+ authMode: AuthModeEnum = AuthModeEnum.NONE,
343
+ password: string = '',
344
+ connectionPriority: number = 1,
345
+ proxy?: Proxy
346
+ ): Promise<boolean> {
347
+ return ThetaClientReactNative.setAccessPointDynamically(
348
+ ssid,
349
+ ssidStealth,
350
+ authMode,
351
+ password,
352
+ connectionPriority,
353
+ proxy
354
+ );
355
+ }
356
+
357
+ /**
358
+ * Set access point. IP address is set statically.
359
+ *
360
+ * @function setAccessPointStatically
361
+ * @param {string} ssid SSID of the access point.
362
+ * @param {boolean} ssidStealth True if SSID stealth is enabled.
363
+ * @param {AuthModeEnum} authMode Authentication mode.
364
+ * @param {string} password Password. If authMode is "NONE", pass empty String.
365
+ * @param {number} connectionPriority Connection priority 1 to 5.
366
+ * @param {string} ipAddress IP address assigns to Theta.
367
+ * @param {string} subnetMask Subnet mask.
368
+ * @param {string} defaultGateway Default gateway.
369
+ * @param {Proxy} proxy Proxy information to be used for the access point.
370
+ * @return promise of boolean result
371
+ */
372
+ export function setAccessPointStatically(
373
+ ssid: string,
374
+ ssidStealth: boolean = false,
375
+ authMode: AuthModeEnum = AuthModeEnum.NONE,
376
+ password: string = '',
377
+ connectionPriority: number = 1,
378
+ ipAddress: string,
379
+ subnetMask: string,
380
+ defaultGateway: string,
381
+ proxy?: Proxy
382
+ ): Promise<boolean> {
383
+ return ThetaClientReactNative.setAccessPointStatically(
384
+ ssid,
385
+ ssidStealth,
386
+ authMode,
387
+ password,
388
+ connectionPriority,
389
+ ipAddress,
390
+ subnetMask,
391
+ defaultGateway,
392
+ proxy
393
+ );
394
+ }
395
+
396
+ /**
397
+ * Deletes access point information used in client mode.
398
+ *
399
+ * @function deleteAccessPoint
400
+ * @param {string} ssid SSID of the access point to delete.
401
+ * @return promise of boolean result
402
+ */
403
+ export function deleteAccessPoint(ssid: string): Promise<boolean> {
404
+ return ThetaClientReactNative.deleteAccessPoint(ssid);
405
+ }
406
+
407
+ /**
408
+ * Acquires the shooting properties set by the camera._setMySetting command.
409
+ * Just for Theta V and later.
410
+ *
411
+ * @function getMySetting
412
+ * @param captureMode The target shooting mode
413
+ * @returns Options of my setting
414
+ */
415
+ export function getMySetting(captureMode: CaptureModeEnum): Promise<Options> {
416
+ return ThetaClientReactNative.getMySetting(captureMode);
417
+ }
418
+
419
+ /**
420
+ * Acquires the shooting properties set by the camera._setMySetting command.
421
+ * Just for Theta S and SC.
422
+ *
423
+ * @function getMySetting
424
+ * @param optionNames List of option names to acquire
425
+ * @returns Options of my setting
426
+ */
427
+ export function getMySettingFromOldModel(
428
+ optionNames: OptionNameEnum[]
429
+ ): Promise<Options> {
430
+ return ThetaClientReactNative.getMySettingFromOldModel(optionNames);
431
+ }
432
+
433
+ /**
434
+ * Registers shooting conditions in My Settings
435
+ * @function setMySetting
436
+ * @param captureMode The target shooting mode. RICOH THETA S and SC do not support My Settings in video capture mode.
437
+ * @param options registered to My Settings
438
+ * @returns Promise of boolean result, always true
439
+ */
440
+ export function setMySetting(
441
+ captureMode: CaptureModeEnum,
442
+ options: Options
443
+ ): Promise<boolean> {
444
+ return ThetaClientReactNative.setMySetting(captureMode, options);
445
+ }
446
+
447
+ /**
448
+ * Delete shooting conditions in My Settings. Supported just by Theta X and Z1.
449
+ * @param captureMode The target shooting mode
450
+ * @returns Promise of boolean result, always true
451
+ */
452
+ export function deleteMySetting(
453
+ captureMode: CaptureModeEnum
454
+ ): Promise<boolean> {
455
+ return ThetaClientReactNative.deleteMySetting(captureMode);
456
+ }
457
+
458
+ /**
459
+ * Acquires a list of installed plugins
460
+ * @function listPlugins
461
+ * @return A list of the plugins installed in Theta.
462
+ */
463
+ export function listPlugins(): Promise<PluginInfo[]> {
464
+ return ThetaClientReactNative.listPlugins();
465
+ }
466
+
467
+ /**
468
+ * Sets the installed plugin for boot. Supported just by Theta V.
469
+ * @function setPlugin
470
+ * @param packageName Package name of the target plugin.
471
+ * @return Promise of boolean result, always true.
472
+ */
473
+ export function setPlugin(packageName: string): Promise<boolean> {
474
+ return ThetaClientReactNative.setPlugin(packageName);
475
+ }
476
+
477
+ /**
478
+ * Start the plugin specified by the [packageName].
479
+ * @function startPlugin
480
+ * @param packageName Package name of the target plugin.
481
+ * @return Promise of boolean result, always true.
482
+ */
483
+ export function startPlugin(packageName: string): Promise<boolean> {
484
+ return ThetaClientReactNative.startPlugin(packageName);
485
+ }
486
+
487
+ /**
488
+ * Stop the running plugin.
489
+ * @function stopPlugin
490
+ * @return Promise of boolean result, always true.
491
+ */
492
+ export function stopPlugin(): Promise<boolean> {
493
+ return ThetaClientReactNative.stopPlugin();
494
+ }
495
+
496
+ /**
497
+ * Acquires the license for the installed plugin.
498
+ * @function getPluginLicense
499
+ * @param packageName Package name of the target plugin.
500
+ * @return Promise of string result, HTML string of the license.
501
+ */
502
+ export function getPluginLicense(packageName: string): Promise<string> {
503
+ return ThetaClientReactNative.getPluginLicense(packageName);
504
+ }
505
+
506
+ /**
507
+ * Return the plugin orders. Supported just by Theta X and Z1.
508
+ * @function getPluginOrders
509
+ * @return Promise of string[] result, list of package names of plugins.
510
+ */
511
+ export function getPluginOrders(): Promise<string[]> {
512
+ return ThetaClientReactNative.getPluginOrders();
513
+ }
514
+
515
+ /**
516
+ * Sets the plugin orders. Supported just by Theta X and Z1.
517
+ * @function setPluginOrders
518
+ * @param plugins list of package names of plugins.
519
+ * For Z1, list size must be three. No restrictions for the size for X.
520
+ * When not specifying, set an empty string.
521
+ * If an empty string is placed mid-way, it will be moved to the front.
522
+ * Specifying zero package name will result in an error
523
+ * @return Promise of boolean result, always true.
524
+ */
525
+ export function setPluginOrders(plugins: string[]): Promise<boolean> {
526
+ return ThetaClientReactNative.setPluginOrders(plugins);
527
+ }