theta-client-react-native 1.5.0 → 1.7.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 (166) hide show
  1. package/android/build.gradle +2 -2
  2. package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +196 -19
  3. package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +493 -3
  4. package/ios/ConvertUtil.swift +272 -18
  5. package/ios/ThetaClientReactNative.m +56 -0
  6. package/ios/ThetaClientReactNative.swift +574 -2
  7. package/lib/commonjs/capture/burst-capture.js +119 -0
  8. package/lib/commonjs/capture/burst-capture.js.map +1 -0
  9. package/lib/commonjs/capture/composite-interval-capture.js +112 -0
  10. package/lib/commonjs/capture/composite-interval-capture.js.map +1 -0
  11. package/lib/commonjs/capture/continuous-capture.js +108 -0
  12. package/lib/commonjs/capture/continuous-capture.js.map +1 -0
  13. package/lib/commonjs/capture/index.js +44 -0
  14. package/lib/commonjs/capture/index.js.map +1 -1
  15. package/lib/commonjs/capture/multi-bracket-capture.js +121 -0
  16. package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -0
  17. package/lib/commonjs/capture/shot-count-specified-interval-capture.js +1 -0
  18. package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
  19. package/lib/commonjs/capture/time-shift-capture.js +9 -1
  20. package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
  21. package/lib/commonjs/index.js +1 -2
  22. package/lib/commonjs/index.js.map +1 -1
  23. package/lib/commonjs/theta-repository/access-point.js +1 -2
  24. package/lib/commonjs/theta-repository/access-point.js.map +1 -1
  25. package/lib/commonjs/theta-repository/options/index.js +44 -0
  26. package/lib/commonjs/theta-repository/options/index.js.map +1 -1
  27. package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js +1 -2
  28. package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js.map +1 -1
  29. package/lib/commonjs/theta-repository/options/option-auto-bracket.js +6 -0
  30. package/lib/commonjs/theta-repository/options/option-auto-bracket.js.map +1 -0
  31. package/lib/commonjs/theta-repository/options/option-bitrate.js +1 -2
  32. package/lib/commonjs/theta-repository/options/option-bitrate.js.map +1 -1
  33. package/lib/commonjs/theta-repository/options/option-bluetooth-role.js +20 -0
  34. package/lib/commonjs/theta-repository/options/option-bluetooth-role.js.map +1 -0
  35. package/lib/commonjs/theta-repository/options/option-burst-mode.js +1 -2
  36. package/lib/commonjs/theta-repository/options/option-burst-mode.js.map +1 -1
  37. package/lib/commonjs/theta-repository/options/option-burst-option.js +11 -12
  38. package/lib/commonjs/theta-repository/options/option-burst-option.js.map +1 -1
  39. package/lib/commonjs/theta-repository/options/option-camera-control-source.js +1 -2
  40. package/lib/commonjs/theta-repository/options/option-camera-control-source.js.map +1 -1
  41. package/lib/commonjs/theta-repository/options/option-camera-mode.js +1 -2
  42. package/lib/commonjs/theta-repository/options/option-camera-mode.js.map +1 -1
  43. package/lib/commonjs/theta-repository/options/option-capture-mode.js +1 -2
  44. package/lib/commonjs/theta-repository/options/option-capture-mode.js.map +1 -1
  45. package/lib/commonjs/theta-repository/options/option-continuous-number.js +1 -2
  46. package/lib/commonjs/theta-repository/options/option-continuous-number.js.map +1 -1
  47. package/lib/commonjs/theta-repository/options/option-face-detect.js +1 -2
  48. package/lib/commonjs/theta-repository/options/option-face-detect.js.map +1 -1
  49. package/lib/commonjs/theta-repository/options/option-filter.js +1 -2
  50. package/lib/commonjs/theta-repository/options/option-filter.js.map +1 -1
  51. package/lib/commonjs/theta-repository/options/option-function.js +1 -2
  52. package/lib/commonjs/theta-repository/options/option-function.js.map +1 -1
  53. package/lib/commonjs/theta-repository/options/option-gain.js +1 -2
  54. package/lib/commonjs/theta-repository/options/option-gain.js.map +1 -1
  55. package/lib/commonjs/theta-repository/options/option-image-stitching.js +1 -2
  56. package/lib/commonjs/theta-repository/options/option-image-stitching.js.map +1 -1
  57. package/lib/commonjs/theta-repository/options/option-network-type.js +1 -2
  58. package/lib/commonjs/theta-repository/options/option-network-type.js.map +1 -1
  59. package/lib/commonjs/theta-repository/options/option-off-delay.js +42 -0
  60. package/lib/commonjs/theta-repository/options/option-off-delay.js.map +1 -0
  61. package/lib/commonjs/theta-repository/options/option-power-saving.js +1 -2
  62. package/lib/commonjs/theta-repository/options/option-power-saving.js.map +1 -1
  63. package/lib/commonjs/theta-repository/options/option-preset.js +1 -2
  64. package/lib/commonjs/theta-repository/options/option-preset.js.map +1 -1
  65. package/lib/commonjs/theta-repository/options/option-preview-format.js +1 -2
  66. package/lib/commonjs/theta-repository/options/option-preview-format.js.map +1 -1
  67. package/lib/commonjs/theta-repository/options/option-shooting-method.js +1 -2
  68. package/lib/commonjs/theta-repository/options/option-shooting-method.js.map +1 -1
  69. package/lib/commonjs/theta-repository/options/option-shutter-speed.js +1 -2
  70. package/lib/commonjs/theta-repository/options/option-shutter-speed.js.map +1 -1
  71. package/lib/commonjs/theta-repository/options/option-sleep-delay.js +42 -0
  72. package/lib/commonjs/theta-repository/options/option-sleep-delay.js.map +1 -0
  73. package/lib/commonjs/theta-repository/options/option-time-shift.js +1 -2
  74. package/lib/commonjs/theta-repository/options/option-time-shift.js.map +1 -1
  75. package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js +1 -2
  76. package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js.map +1 -1
  77. package/lib/commonjs/theta-repository/options/option-video-stitching.js +1 -2
  78. package/lib/commonjs/theta-repository/options/option-video-stitching.js.map +1 -1
  79. package/lib/commonjs/theta-repository/options/option-visibility-reduction.js +1 -2
  80. package/lib/commonjs/theta-repository/options/option-visibility-reduction.js.map +1 -1
  81. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js +1 -2
  82. package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js.map +1 -1
  83. package/lib/commonjs/theta-repository/options/option-wlan-frequency.js +1 -2
  84. package/lib/commonjs/theta-repository/options/option-wlan-frequency.js.map +1 -1
  85. package/lib/commonjs/theta-repository/options/options.js +32 -62
  86. package/lib/commonjs/theta-repository/options/options.js.map +1 -1
  87. package/lib/commonjs/theta-repository/theta-files.js +7 -8
  88. package/lib/commonjs/theta-repository/theta-files.js.map +1 -1
  89. package/lib/commonjs/theta-repository/theta-info.js +1 -2
  90. package/lib/commonjs/theta-repository/theta-info.js.map +1 -1
  91. package/lib/commonjs/theta-repository/theta-repository.js +50 -23
  92. package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
  93. package/lib/commonjs/theta-repository/theta-state.js +7 -8
  94. package/lib/commonjs/theta-repository/theta-state.js.map +1 -1
  95. package/lib/module/capture/burst-capture.js +111 -0
  96. package/lib/module/capture/burst-capture.js.map +1 -0
  97. package/lib/module/capture/composite-interval-capture.js +104 -0
  98. package/lib/module/capture/composite-interval-capture.js.map +1 -0
  99. package/lib/module/capture/continuous-capture.js +100 -0
  100. package/lib/module/capture/continuous-capture.js.map +1 -0
  101. package/lib/module/capture/index.js +4 -0
  102. package/lib/module/capture/index.js.map +1 -1
  103. package/lib/module/capture/multi-bracket-capture.js +113 -0
  104. package/lib/module/capture/multi-bracket-capture.js.map +1 -0
  105. package/lib/module/capture/shot-count-specified-interval-capture.js +1 -0
  106. package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
  107. package/lib/module/capture/time-shift-capture.js +9 -1
  108. package/lib/module/capture/time-shift-capture.js.map +1 -1
  109. package/lib/module/theta-repository/options/index.js +4 -0
  110. package/lib/module/theta-repository/options/index.js.map +1 -1
  111. package/lib/module/theta-repository/options/option-auto-bracket.js +2 -0
  112. package/lib/module/theta-repository/options/option-auto-bracket.js.map +1 -0
  113. package/lib/module/theta-repository/options/option-bluetooth-role.js +14 -0
  114. package/lib/module/theta-repository/options/option-bluetooth-role.js.map +1 -0
  115. package/lib/module/theta-repository/options/option-off-delay.js +35 -0
  116. package/lib/module/theta-repository/options/option-off-delay.js.map +1 -0
  117. package/lib/module/theta-repository/options/option-sleep-delay.js +35 -0
  118. package/lib/module/theta-repository/options/option-sleep-delay.js.map +1 -0
  119. package/lib/module/theta-repository/options/options.js +4 -32
  120. package/lib/module/theta-repository/options/options.js.map +1 -1
  121. package/lib/module/theta-repository/theta-repository.js +47 -24
  122. package/lib/module/theta-repository/theta-repository.js.map +1 -1
  123. package/lib/typescript/capture/burst-capture.d.ts +55 -0
  124. package/lib/typescript/capture/burst-capture.d.ts.map +1 -0
  125. package/lib/typescript/capture/composite-interval-capture.d.ts +47 -0
  126. package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -0
  127. package/lib/typescript/capture/continuous-capture.d.ts +49 -0
  128. package/lib/typescript/capture/continuous-capture.d.ts.map +1 -0
  129. package/lib/typescript/capture/index.d.ts +4 -0
  130. package/lib/typescript/capture/index.d.ts.map +1 -1
  131. package/lib/typescript/capture/multi-bracket-capture.d.ts +56 -0
  132. package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -0
  133. package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts +1 -0
  134. package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
  135. package/lib/typescript/capture/time-shift-capture.d.ts +2 -1
  136. package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
  137. package/lib/typescript/theta-repository/options/index.d.ts +4 -0
  138. package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
  139. package/lib/typescript/theta-repository/options/option-auto-bracket.d.ts +36 -0
  140. package/lib/typescript/theta-repository/options/option-auto-bracket.d.ts.map +1 -0
  141. package/lib/typescript/theta-repository/options/option-bluetooth-role.d.ts +14 -0
  142. package/lib/typescript/theta-repository/options/option-bluetooth-role.d.ts.map +1 -0
  143. package/lib/typescript/theta-repository/options/option-off-delay.d.ts +22 -0
  144. package/lib/typescript/theta-repository/options/option-off-delay.d.ts.map +1 -0
  145. package/lib/typescript/theta-repository/options/option-sleep-delay.d.ts +22 -0
  146. package/lib/typescript/theta-repository/options/option-sleep-delay.d.ts.map +1 -0
  147. package/lib/typescript/theta-repository/options/options.d.ts +12 -30
  148. package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
  149. package/lib/typescript/theta-repository/theta-repository.d.ts +32 -2
  150. package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
  151. package/package.json +2 -2
  152. package/src/capture/burst-capture.ts +169 -0
  153. package/src/capture/composite-interval-capture.ts +140 -0
  154. package/src/capture/continuous-capture.ts +126 -0
  155. package/src/capture/index.ts +4 -0
  156. package/src/capture/multi-bracket-capture.ts +145 -0
  157. package/src/capture/shot-count-specified-interval-capture.ts +1 -0
  158. package/src/capture/time-shift-capture.ts +19 -1
  159. package/src/theta-repository/options/index.ts +4 -0
  160. package/src/theta-repository/options/option-auto-bracket.ts +48 -0
  161. package/src/theta-repository/options/option-bluetooth-role.ts +15 -0
  162. package/src/theta-repository/options/option-off-delay.ts +38 -0
  163. package/src/theta-repository/options/option-sleep-delay.ts +37 -0
  164. package/src/theta-repository/options/options.ts +12 -38
  165. package/src/theta-repository/theta-repository.ts +68 -0
  166. package/theta-client-react-native.podspec +1 -1
@@ -4,8 +4,8 @@ import type { ThetaState } from './theta-state';
4
4
  import type { ThetaInfo, ThetaModel } from './theta-info';
5
5
  import type { MetaInfo } from './theta-meta';
6
6
  import type { PluginInfo } from './theta-plugin';
7
- import type { OptionNameEnum, Options, CaptureModeEnum, Proxy } from './options';
8
- import { PhotoCaptureBuilder, VideoCaptureBuilder, TimeShiftCaptureBuilder, LimitlessIntervalCaptureBuilder, ShotCountSpecifiedIntervalCaptureBuilder } from '../capture';
7
+ import type { OptionNameEnum, Options, CaptureModeEnum, Proxy, BurstCaptureNumEnum, BurstBracketStepEnum, BurstCompensationEnum, BurstMaxExposureTimeEnum, BurstEnableIsoControlEnum, BurstOrderEnum } from './options';
8
+ import { PhotoCaptureBuilder, VideoCaptureBuilder, TimeShiftCaptureBuilder, LimitlessIntervalCaptureBuilder, ShotCountSpecifiedIntervalCaptureBuilder, CompositeIntervalCaptureBuilder, BurstCaptureBuilder, ContinuousCaptureBuilder, MultiBracketCaptureBuilder } from '../capture';
9
9
  import type { ThetaConfig } from './theta-config';
10
10
  import type { ThetaTimeout } from './theta-timeout';
11
11
  /**
@@ -69,6 +69,36 @@ export declare function getLimitlessIntervalCaptureBuilder(): LimitlessIntervalC
69
69
  * @return created ShotCountSpecifiedIntervalCaptureBuilder instance
70
70
  */
71
71
  export declare function getShotCountSpecifiedIntervalCaptureBuilder(shotCount: number): ShotCountSpecifiedIntervalCaptureBuilder;
72
+ /**
73
+ * Get CompositeIntervalCapture.Builder for take interval composite shooting.
74
+ *
75
+ * @function getCompositeIntervalCaptureBuilder
76
+ * @param {shootingTimeSec} Shooting time for interval composite shooting (sec)
77
+ * @return created CompositeIntervalCaptureBuilder instance
78
+ */
79
+ export declare function getCompositeIntervalCaptureBuilder(shootingTimeSec: number): CompositeIntervalCaptureBuilder;
80
+ /**
81
+ * Get BurstCapture.Builder for take burst shooting.
82
+ *
83
+ * @function getBurstCaptureBuilder
84
+ * @param burstOption Burst shooting setting.
85
+ * @return created BurstCaptureBuilder instance
86
+ */
87
+ export declare function getBurstCaptureBuilder(burstCaptureNum: BurstCaptureNumEnum, burstBracketStep: BurstBracketStepEnum, burstCompensation: BurstCompensationEnum, burstMaxExposureTime: BurstMaxExposureTimeEnum, burstEnableIsoControl: BurstEnableIsoControlEnum, burstOrder: BurstOrderEnum): BurstCaptureBuilder;
88
+ /**
89
+ * Get MultiBracketCapture.Builder for take multi bracket shooting.
90
+ *
91
+ * @function getMultiBracketCaptureBuilder
92
+ * @return created MultiBracketCaptureBuilder instance
93
+ */
94
+ export declare function getMultiBracketCaptureBuilder(): MultiBracketCaptureBuilder;
95
+ /**
96
+ * Get ContinuousCapture.Builder for take limitless interval shooting.
97
+ *
98
+ * @function getContinuousCaptureBuilder
99
+ * @return created ContinuousCaptureBuilder instance
100
+ */
101
+ export declare function getContinuousCaptureBuilder(): ContinuousCaptureBuilder;
72
102
  /**
73
103
  * Start live preview.
74
104
  * preview frame (JPEG DataURL) send THETA_EVENT_NAME event as
@@ -1 +1 @@
1
- {"version":3,"file":"theta-repository.d.ts","sourceRoot":"","sources":["../../../src/theta-repository/theta-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,eAAe,EACf,KAAK,EACN,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,+BAA+B,EAC/B,wCAAwC,EACzC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD;;;;;;;;IAQI;AACJ,wBAAgB,UAAU,CACxB,QAAQ,GAAE,MAA6B,EACvC,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED;;;;;IAKI;AACJ,wBAAgB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAExC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,uBAAuB,CAEpE;AAED;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,OAAO,CAAC,OAAO,CAAC,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAErE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAEnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAEnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theta-client-react-native",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "This library provides a way to control RICOH THETA using.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -68,7 +68,7 @@
68
68
  "pod-install": "^0.1.0",
69
69
  "prettier": "^2.8.1",
70
70
  "react": "18.2.0",
71
- "react-native": "0.71.7",
71
+ "react-native": "0.71.14",
72
72
  "react-native-builder-bob": "^0.20.3",
73
73
  "release-it": "^15.5.1",
74
74
  "typescript": "^4.9.4"
@@ -0,0 +1,169 @@
1
+ import { CaptureBuilder } from './capture';
2
+ import { NativeModules } from 'react-native';
3
+ import {
4
+ BaseNotify,
5
+ NotifyController,
6
+ } from '../theta-repository/notify-controller';
7
+ import type {
8
+ BurstBracketStepEnum,
9
+ BurstCaptureNumEnum,
10
+ BurstCompensationEnum,
11
+ BurstEnableIsoControlEnum,
12
+ BurstMaxExposureTimeEnum,
13
+ BurstModeEnum,
14
+ BurstOrderEnum,
15
+ } from '../theta-repository/options';
16
+ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
17
+
18
+ const NOTIFY_PROGRESS = 'BURST-PROGRESS';
19
+ const NOTIFY_STOP_ERROR = 'BURST-STOP-ERROR';
20
+
21
+ interface CaptureProgressNotify extends BaseNotify {
22
+ params?: {
23
+ completion: number;
24
+ };
25
+ }
26
+
27
+ interface CaptureStopErrorNotify extends BaseNotify {
28
+ params?: {
29
+ message: string;
30
+ };
31
+ }
32
+
33
+ /**
34
+ * BurstCapture class
35
+ */
36
+ export class BurstCapture {
37
+ notify: NotifyController;
38
+ constructor(notify: NotifyController) {
39
+ this.notify = notify;
40
+ }
41
+ /**
42
+ * start burst shooting
43
+ * @param onProgress the block for burst shooting onProgress
44
+ * @return promise of captured file url
45
+ */
46
+ async startCapture(
47
+ onProgress?: (completion?: number) => void,
48
+ onStopFailed?: (error: any) => void
49
+ ): Promise<string[] | undefined> {
50
+ if (onProgress) {
51
+ this.notify.addNotify(NOTIFY_PROGRESS, (event: CaptureProgressNotify) => {
52
+ onProgress(event.params?.completion);
53
+ });
54
+ }
55
+ if (onStopFailed) {
56
+ this.notify.addNotify(
57
+ NOTIFY_STOP_ERROR,
58
+ (event: CaptureStopErrorNotify) => {
59
+ onStopFailed(event.params);
60
+ }
61
+ );
62
+ }
63
+
64
+ return new Promise<string[] | undefined>(async (resolve, reject) => {
65
+ await ThetaClientReactNative.startBurstCapture()
66
+ .then((result?: string[]) => {
67
+ resolve(result ?? undefined);
68
+ })
69
+ .catch((error: any) => {
70
+ reject(error);
71
+ })
72
+ .finally(() => {
73
+ this.notify.removeNotify(NOTIFY_PROGRESS);
74
+ this.notify.removeNotify(NOTIFY_STOP_ERROR);
75
+ });
76
+ });
77
+ }
78
+
79
+ /**
80
+ * cancel burst shooting
81
+ */
82
+ async cancelCapture(): Promise<any> {
83
+ return await ThetaClientReactNative.cancelBurstCapture();
84
+ }
85
+ }
86
+
87
+ /**
88
+ * BurstCaptureBuilder class
89
+ */
90
+ export class BurstCaptureBuilder extends CaptureBuilder<BurstCaptureBuilder> {
91
+ interval?: number;
92
+ readonly burstCaptureNum: BurstCaptureNumEnum;
93
+ readonly burstBracketStep: BurstBracketStepEnum;
94
+ readonly burstCompensation: BurstCompensationEnum;
95
+ readonly burstMaxExposureTime: BurstMaxExposureTimeEnum;
96
+ readonly burstEnableIsoControl: BurstEnableIsoControlEnum;
97
+ readonly burstOrder: BurstOrderEnum;
98
+
99
+ /** construct BurstCaptureBuilder instance */
100
+ constructor(
101
+ burstCaptureNum: BurstCaptureNumEnum,
102
+ burstBracketStep: BurstBracketStepEnum,
103
+ burstCompensation: BurstCompensationEnum,
104
+ burstMaxExposureTime: BurstMaxExposureTimeEnum,
105
+ burstEnableIsoControl: BurstEnableIsoControlEnum,
106
+ burstOrder: BurstOrderEnum
107
+ ) {
108
+ super();
109
+
110
+ this.interval = undefined;
111
+ this.burstCaptureNum = burstCaptureNum;
112
+ this.burstBracketStep = burstBracketStep;
113
+ this.burstCompensation = burstCompensation;
114
+ this.burstMaxExposureTime = burstMaxExposureTime;
115
+ this.burstEnableIsoControl = burstEnableIsoControl;
116
+ this.burstOrder = burstOrder;
117
+ }
118
+
119
+ /**
120
+ * set interval of checking burst shooting status command
121
+ * @param timeMillis interval
122
+ * @returns BurstCaptureBuilder
123
+ */
124
+ setCheckStatusCommandInterval(timeMillis: number): BurstCaptureBuilder {
125
+ this.interval = timeMillis;
126
+ return this;
127
+ }
128
+
129
+ /**
130
+ * BurstMode setting.
131
+ * When this is set to ON, burst shooting is enabled,
132
+ * and a screen dedicated to burst shooting is displayed in Live View.
133
+ * @param mode BurstMode
134
+ * @return BurstCaptureBuilder
135
+ */
136
+ setBurstMode(mode: BurstModeEnum): BurstCaptureBuilder {
137
+ this.options.burstMode = mode;
138
+ return this;
139
+ }
140
+
141
+ /**
142
+ * Builds an instance of a BurstCapture that has all the combined
143
+ * parameters of the Options that have been added to the Builder.
144
+ * @return promise of BurstCapture instance
145
+ */
146
+ build(): Promise<BurstCapture> {
147
+ let params = {
148
+ ...this.options,
149
+ // Cannot pass negative values in IOS, use objects
150
+ _capture_interval: this.interval ?? -1,
151
+ };
152
+ return new Promise<BurstCapture>(async (resolve, reject) => {
153
+ try {
154
+ await ThetaClientReactNative.getBurstCaptureBuilder(
155
+ this.burstCaptureNum,
156
+ this.burstBracketStep,
157
+ this.burstCompensation,
158
+ this.burstMaxExposureTime,
159
+ this.burstEnableIsoControl,
160
+ this.burstOrder
161
+ );
162
+ await ThetaClientReactNative.buildBurstCapture(params);
163
+ resolve(new BurstCapture(NotifyController.instance));
164
+ } catch (error) {
165
+ reject(error);
166
+ }
167
+ });
168
+ }
169
+ }
@@ -0,0 +1,140 @@
1
+ import { CaptureBuilder } from './capture';
2
+ import { NativeModules } from 'react-native';
3
+ import {
4
+ BaseNotify,
5
+ NotifyController,
6
+ } from '../theta-repository/notify-controller';
7
+ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
8
+
9
+ const NOTIFY_PROGRESS = 'COMPOSITE-INTERVAL-PROGRESS';
10
+ const NOTIFY_STOP_ERROR = 'COMPOSITE-INTERVAL-STOP-ERROR';
11
+
12
+ interface CaptureProgressNotify extends BaseNotify {
13
+ params?: {
14
+ completion: number;
15
+ };
16
+ }
17
+
18
+ interface CaptureStopErrorNotify extends BaseNotify {
19
+ params?: {
20
+ message: string;
21
+ };
22
+ }
23
+
24
+ /**
25
+ * CompositeIntervalCapture class
26
+ */
27
+ export class CompositeIntervalCapture {
28
+ notify: NotifyController;
29
+ constructor(notify: NotifyController) {
30
+ this.notify = notify;
31
+ }
32
+ /**
33
+ * start interval composite shooting
34
+ * @param onProgress the block for interval composite shooting onProgress
35
+ * @return promise of captured file url
36
+ */
37
+ async startCapture(
38
+ onProgress?: (completion?: number) => void,
39
+ onStopFailed?: (error: any) => void
40
+ ): Promise<string[] | undefined> {
41
+ if (onProgress) {
42
+ this.notify.addNotify(NOTIFY_PROGRESS, (event: CaptureProgressNotify) => {
43
+ onProgress(event.params?.completion);
44
+ });
45
+ }
46
+ if (onStopFailed) {
47
+ this.notify.addNotify(
48
+ NOTIFY_STOP_ERROR,
49
+ (event: CaptureStopErrorNotify) => {
50
+ onStopFailed(event.params);
51
+ }
52
+ );
53
+ }
54
+
55
+ return new Promise<string[] | undefined>(async (resolve, reject) => {
56
+ await ThetaClientReactNative.startCompositeIntervalCapture()
57
+ .then((result?: string[]) => {
58
+ resolve(result ?? undefined);
59
+ })
60
+ .catch((error: any) => {
61
+ reject(error);
62
+ })
63
+ .finally(() => {
64
+ this.notify.removeNotify(NOTIFY_PROGRESS);
65
+ this.notify.removeNotify(NOTIFY_STOP_ERROR);
66
+ });
67
+ });
68
+ }
69
+
70
+ /**
71
+ * cancel interval composite shooting
72
+ */
73
+ async cancelCapture(): Promise<any> {
74
+ return await ThetaClientReactNative.cancelCompositeIntervalCapture();
75
+ }
76
+ }
77
+
78
+ /**
79
+ * CompositeIntervalCaptureBuilder class
80
+ */
81
+ export class CompositeIntervalCaptureBuilder extends CaptureBuilder<CompositeIntervalCaptureBuilder> {
82
+ interval?: number;
83
+ readonly shootingTimeSec: number;
84
+
85
+ /** construct CompositeIntervalCaptureBuilder instance */
86
+ constructor(shootingTimeSec: number) {
87
+ super();
88
+
89
+ this.interval = undefined;
90
+ this.shootingTimeSec = shootingTimeSec;
91
+ }
92
+
93
+ /**
94
+ * set interval of checking interval composite shooting status command
95
+ * @param timeMillis interval
96
+ * @returns CompositeIntervalCaptureBuilder
97
+ */
98
+ setCheckStatusCommandInterval(
99
+ timeMillis: number
100
+ ): CompositeIntervalCaptureBuilder {
101
+ this.interval = timeMillis;
102
+ return this;
103
+ }
104
+
105
+ /**
106
+ * Set In-progress save interval for interval composite shooting (sec).
107
+ * @param {interval} sec sec.
108
+ * @return CompositeIntervalCaptureBuilder
109
+ */
110
+ setCompositeShootingOutputInterval(
111
+ sec: number
112
+ ): CompositeIntervalCaptureBuilder {
113
+ this.options.compositeShootingOutputInterval = sec;
114
+ return this;
115
+ }
116
+
117
+ /**
118
+ * Builds an instance of a CompositeIntervalCapture that has all the combined
119
+ * parameters of the Options that have been added to the Builder.
120
+ * @return promise of CompositeIntervalCapture instance
121
+ */
122
+ build(): Promise<CompositeIntervalCapture> {
123
+ let params = {
124
+ ...this.options,
125
+ // Cannot pass negative values in IOS, use objects
126
+ _capture_interval: this.interval ?? -1,
127
+ };
128
+ return new Promise<CompositeIntervalCapture>(async (resolve, reject) => {
129
+ try {
130
+ await ThetaClientReactNative.getCompositeIntervalCaptureBuilder(
131
+ this.shootingTimeSec
132
+ );
133
+ await ThetaClientReactNative.buildCompositeIntervalCapture(params);
134
+ resolve(new CompositeIntervalCapture(NotifyController.instance));
135
+ } catch (error) {
136
+ reject(error);
137
+ }
138
+ });
139
+ }
140
+ }
@@ -0,0 +1,126 @@
1
+ import { CaptureBuilder } from './capture';
2
+ import { NativeModules } from 'react-native';
3
+ import {
4
+ BaseNotify,
5
+ NotifyController,
6
+ } from '../theta-repository/notify-controller';
7
+ import {
8
+ ContinuousNumberEnum,
9
+ PhotoFileFormatEnum,
10
+ OptionNameEnum,
11
+ } from '../theta-repository/options';
12
+ import { getOptions } from '../theta-repository';
13
+ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
14
+
15
+ const NOTIFY_PROGRESS = 'CONTINUOUS-PROGRESS';
16
+
17
+ interface CaptureProgressNotify extends BaseNotify {
18
+ params?: {
19
+ completion: number;
20
+ };
21
+ }
22
+
23
+ /**
24
+ * ContinuousCapture class
25
+ */
26
+ export class ContinuousCapture {
27
+ notify: NotifyController;
28
+ constructor(notify: NotifyController) {
29
+ this.notify = notify;
30
+ }
31
+ /**
32
+ * start continuous shooting
33
+ * @param onProgress the block for continuous shooting onProgress
34
+ * @return promise of captured file url
35
+ */
36
+ async startCapture(
37
+ onProgress?: (completion?: number) => void
38
+ ): Promise<string[] | undefined> {
39
+ if (onProgress) {
40
+ this.notify.addNotify(NOTIFY_PROGRESS, (event: CaptureProgressNotify) => {
41
+ onProgress(event.params?.completion);
42
+ });
43
+ }
44
+
45
+ return new Promise<string[] | undefined>(async (resolve, reject) => {
46
+ await ThetaClientReactNative.startContinuousCapture()
47
+ .then((result?: string[]) => {
48
+ resolve(result ?? undefined);
49
+ })
50
+ .catch((error: any) => {
51
+ reject(error);
52
+ })
53
+ .finally(() => {
54
+ this.notify.removeNotify(NOTIFY_PROGRESS);
55
+ });
56
+ });
57
+ }
58
+
59
+ /**
60
+ * Get Number of shots for continuous shooting.
61
+ * @returns ContinuousNumberEnum
62
+ */
63
+ async getContinuousNumber(): Promise<ContinuousNumberEnum> {
64
+ return (
65
+ (await getOptions([OptionNameEnum.ContinuousNumber])).continuousNumber ??
66
+ ContinuousNumberEnum.UNSUPPORTED
67
+ );
68
+ }
69
+ }
70
+
71
+ /**
72
+ * ContinuousCaptureBuilder class
73
+ */
74
+ export class ContinuousCaptureBuilder extends CaptureBuilder<ContinuousCaptureBuilder> {
75
+ interval?: number;
76
+
77
+ /** construct ContinuousCaptureBuilder instance */
78
+ constructor() {
79
+ super();
80
+
81
+ this.interval = undefined;
82
+ }
83
+
84
+ /**
85
+ * set interval of checking continuous shooting status command
86
+ * @param timeMillis interval
87
+ * @returns ContinuousCaptureBuilder
88
+ */
89
+ setCheckStatusCommandInterval(timeMillis: number): ContinuousCaptureBuilder {
90
+ this.interval = timeMillis;
91
+ return this;
92
+ }
93
+
94
+ /**
95
+ * Set photo file format.
96
+ * Continuous shooting only supports 5.5K and 11K
97
+ * @param {PhotoFileFormatEnum} fileFormat Photo file format to set
98
+ * @return PhotoCaptureBuilder
99
+ */
100
+ setFileFormat(fileFormat: PhotoFileFormatEnum): ContinuousCaptureBuilder {
101
+ this.options.fileFormat = fileFormat;
102
+ return this;
103
+ }
104
+
105
+ /**
106
+ * Builds an instance of a ContinuousCapture that has all the combined
107
+ * parameters of the Options that have been added to the Builder.
108
+ * @return promise of ContinuousCapture instance
109
+ */
110
+ build(): Promise<ContinuousCapture> {
111
+ let params = {
112
+ ...this.options,
113
+ // Cannot pass negative values in IOS, use objects
114
+ _capture_interval: this.interval ?? -1,
115
+ };
116
+ return new Promise<ContinuousCapture>(async (resolve, reject) => {
117
+ try {
118
+ await ThetaClientReactNative.getContinuousCaptureBuilder();
119
+ await ThetaClientReactNative.buildContinuousCapture(params);
120
+ resolve(new ContinuousCapture(NotifyController.instance));
121
+ } catch (error) {
122
+ reject(error);
123
+ }
124
+ });
125
+ }
126
+ }
@@ -4,3 +4,7 @@ export * from './video-capture';
4
4
  export * from './time-shift-capture';
5
5
  export * from './limitless-interval-capture';
6
6
  export * from './shot-count-specified-interval-capture';
7
+ export * from './composite-interval-capture';
8
+ export * from './burst-capture';
9
+ export * from './continuous-capture';
10
+ export * from './multi-bracket-capture';
@@ -0,0 +1,145 @@
1
+ import { CaptureBuilder } from './capture';
2
+ import { NativeModules } from 'react-native';
3
+ import {
4
+ BaseNotify,
5
+ NotifyController,
6
+ } from '../theta-repository/notify-controller';
7
+ import type { BracketSetting } from 'src/theta-repository/options';
8
+ const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
9
+
10
+ const NOTIFY_PROGRESS = 'MULTI-BRACKET-PROGRESS';
11
+ const NOTIFY_STOP_ERROR = 'MULTI-BRACKET-STOP-ERROR';
12
+
13
+ interface CaptureProgressNotify extends BaseNotify {
14
+ params?: {
15
+ completion: number;
16
+ };
17
+ }
18
+
19
+ interface CaptureStopErrorNotify extends BaseNotify {
20
+ params?: {
21
+ message: string;
22
+ };
23
+ }
24
+
25
+ /**
26
+ * MultiBracketCapture class
27
+ */
28
+ export class MultiBracketCapture {
29
+ notify: NotifyController;
30
+ constructor(notify: NotifyController) {
31
+ this.notify = notify;
32
+ }
33
+
34
+ /**
35
+ * start multi bracket shooting
36
+ * @param onProgress the block for multi bracket shooting onProgress
37
+ * @return promise of captured file urls
38
+ */
39
+ async startCapture(
40
+ onProgress?: (completion?: number) => void,
41
+ onStopFailed?: (error: any) => void
42
+ ): Promise<string[] | undefined> {
43
+ if (onProgress) {
44
+ this.notify.addNotify(NOTIFY_PROGRESS, (event: CaptureProgressNotify) => {
45
+ onProgress(event.params?.completion);
46
+ });
47
+ }
48
+ if (onStopFailed) {
49
+ this.notify.addNotify(
50
+ NOTIFY_STOP_ERROR,
51
+ (event: CaptureStopErrorNotify) => {
52
+ onStopFailed(event.params);
53
+ }
54
+ );
55
+ }
56
+
57
+ return new Promise<string[] | undefined>(async (resolve, reject) => {
58
+ await ThetaClientReactNative.startMultiBracketCapture()
59
+ .then((result?: string[]) => {
60
+ resolve(result ?? undefined);
61
+ })
62
+ .catch((error: any) => {
63
+ reject(error);
64
+ })
65
+ .finally(() => {
66
+ this.notify.removeNotify(NOTIFY_PROGRESS);
67
+ this.notify.removeNotify(NOTIFY_STOP_ERROR);
68
+ });
69
+ });
70
+ }
71
+
72
+ /**
73
+ * cancel multi bracket shooting
74
+ */
75
+ async cancelCapture(): Promise<any> {
76
+ return await ThetaClientReactNative.cancelMultiBracketCapture();
77
+ }
78
+ }
79
+
80
+ /**
81
+ * MultiBracketCaptureBuilder class
82
+ */
83
+ export class MultiBracketCaptureBuilder extends CaptureBuilder<MultiBracketCaptureBuilder> {
84
+ interval?: number;
85
+
86
+ /** construct MultiBracketCaptureBuilder instance */
87
+ constructor() {
88
+ super();
89
+
90
+ this.interval = undefined;
91
+ }
92
+
93
+ /**
94
+ * set interval of checking multi bracket shooting status command
95
+ * @param timeMillis interval
96
+ * @returns MultiBracketCaptureBuilder
97
+ */
98
+ setCheckStatusCommandInterval(
99
+ timeMillis: number
100
+ ): MultiBracketCaptureBuilder {
101
+ this.interval = timeMillis;
102
+ return this;
103
+ }
104
+
105
+ /**
106
+ * Set bracket settings for multi bracket shooting
107
+ *
108
+ * @param params array of bracket setting.
109
+ * Number of settings have to be 2 to 13.
110
+ * For Theta SC2, S and SC, other settings than iso, shutterSpeed and
111
+ * colorTemperature are ignored.
112
+ * For Theta X, exposureProgram and exposureCompensation are ignored
113
+ * so that always manual program.
114
+ * For others than Theta Z1, aperture is ignored.
115
+ * To setting parameters that are not specified, default values are used.
116
+ *
117
+ * @returns MultiBracketCaptureBuilder
118
+ */
119
+ setBracketSettings(settings: BracketSetting[]): MultiBracketCaptureBuilder {
120
+ this.options.autoBracket = settings;
121
+ return this;
122
+ }
123
+
124
+ /**
125
+ * Builds an instance of a MultiBracketCapture that has all the combined
126
+ * parameters of the Options that have been added to the Builder.
127
+ * @return promise of MultiBracketCapture instance
128
+ */
129
+ build(): Promise<MultiBracketCapture> {
130
+ let params = {
131
+ ...this.options,
132
+ // Cannot pass negative values in IOS, use objects
133
+ _capture_interval: this.interval ?? -1,
134
+ };
135
+ return new Promise<MultiBracketCapture>(async (resolve, reject) => {
136
+ try {
137
+ await ThetaClientReactNative.getMultiBracketCaptureBuilder();
138
+ await ThetaClientReactNative.buildMultiBracketCapture(params);
139
+ resolve(new MultiBracketCapture(NotifyController.instance));
140
+ } catch (error) {
141
+ reject(error);
142
+ }
143
+ });
144
+ }
145
+ }
@@ -32,6 +32,7 @@ export class ShotCountSpecifiedIntervalCapture {
32
32
  /**
33
33
  * start interval shooting with the shot count specified
34
34
  * @param onProgress the block for interval shooting with the shot count specified onProgress
35
+ * @param onStopFailed the block for error of cancelCapture
35
36
  * @return promise of captured file url
36
37
  */
37
38
  async startCapture(