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.
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +196 -19
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +493 -3
- package/ios/ConvertUtil.swift +272 -18
- package/ios/ThetaClientReactNative.m +56 -0
- package/ios/ThetaClientReactNative.swift +574 -2
- package/lib/commonjs/capture/burst-capture.js +119 -0
- package/lib/commonjs/capture/burst-capture.js.map +1 -0
- package/lib/commonjs/capture/composite-interval-capture.js +112 -0
- package/lib/commonjs/capture/composite-interval-capture.js.map +1 -0
- package/lib/commonjs/capture/continuous-capture.js +108 -0
- package/lib/commonjs/capture/continuous-capture.js.map +1 -0
- package/lib/commonjs/capture/index.js +44 -0
- package/lib/commonjs/capture/index.js.map +1 -1
- package/lib/commonjs/capture/multi-bracket-capture.js +121 -0
- package/lib/commonjs/capture/multi-bracket-capture.js.map +1 -0
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js +1 -0
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/commonjs/capture/time-shift-capture.js +9 -1
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/access-point.js +1 -2
- package/lib/commonjs/theta-repository/access-point.js.map +1 -1
- package/lib/commonjs/theta-repository/options/index.js +44 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js +1 -2
- package/lib/commonjs/theta-repository/options/option-ai-auto-thumbnail.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-auto-bracket.js +6 -0
- package/lib/commonjs/theta-repository/options/option-auto-bracket.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-bitrate.js +1 -2
- package/lib/commonjs/theta-repository/options/option-bitrate.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-bluetooth-role.js +20 -0
- package/lib/commonjs/theta-repository/options/option-bluetooth-role.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-burst-mode.js +1 -2
- package/lib/commonjs/theta-repository/options/option-burst-mode.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-burst-option.js +11 -12
- package/lib/commonjs/theta-repository/options/option-burst-option.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-camera-control-source.js +1 -2
- package/lib/commonjs/theta-repository/options/option-camera-control-source.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-camera-mode.js +1 -2
- package/lib/commonjs/theta-repository/options/option-camera-mode.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-capture-mode.js +1 -2
- package/lib/commonjs/theta-repository/options/option-capture-mode.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-continuous-number.js +1 -2
- package/lib/commonjs/theta-repository/options/option-continuous-number.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-face-detect.js +1 -2
- package/lib/commonjs/theta-repository/options/option-face-detect.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-filter.js +1 -2
- package/lib/commonjs/theta-repository/options/option-filter.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-function.js +1 -2
- package/lib/commonjs/theta-repository/options/option-function.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-gain.js +1 -2
- package/lib/commonjs/theta-repository/options/option-gain.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-image-stitching.js +1 -2
- package/lib/commonjs/theta-repository/options/option-image-stitching.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-network-type.js +1 -2
- package/lib/commonjs/theta-repository/options/option-network-type.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-off-delay.js +42 -0
- package/lib/commonjs/theta-repository/options/option-off-delay.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-power-saving.js +1 -2
- package/lib/commonjs/theta-repository/options/option-power-saving.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-preset.js +1 -2
- package/lib/commonjs/theta-repository/options/option-preset.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-preview-format.js +1 -2
- package/lib/commonjs/theta-repository/options/option-preview-format.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-shooting-method.js +1 -2
- package/lib/commonjs/theta-repository/options/option-shooting-method.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-shutter-speed.js +1 -2
- package/lib/commonjs/theta-repository/options/option-shutter-speed.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-sleep-delay.js +42 -0
- package/lib/commonjs/theta-repository/options/option-sleep-delay.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-time-shift.js +1 -2
- package/lib/commonjs/theta-repository/options/option-time-shift.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js +1 -2
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-video-stitching.js +1 -2
- package/lib/commonjs/theta-repository/options/option-video-stitching.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-visibility-reduction.js +1 -2
- package/lib/commonjs/theta-repository/options/option-visibility-reduction.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js +1 -2
- package/lib/commonjs/theta-repository/options/option-white-balance-auto-strength.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-wlan-frequency.js +1 -2
- package/lib/commonjs/theta-repository/options/option-wlan-frequency.js.map +1 -1
- package/lib/commonjs/theta-repository/options/options.js +32 -62
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-files.js +7 -8
- package/lib/commonjs/theta-repository/theta-files.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-info.js +1 -2
- package/lib/commonjs/theta-repository/theta-info.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +50 -23
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state.js +7 -8
- package/lib/commonjs/theta-repository/theta-state.js.map +1 -1
- package/lib/module/capture/burst-capture.js +111 -0
- package/lib/module/capture/burst-capture.js.map +1 -0
- package/lib/module/capture/composite-interval-capture.js +104 -0
- package/lib/module/capture/composite-interval-capture.js.map +1 -0
- package/lib/module/capture/continuous-capture.js +100 -0
- package/lib/module/capture/continuous-capture.js.map +1 -0
- package/lib/module/capture/index.js +4 -0
- package/lib/module/capture/index.js.map +1 -1
- package/lib/module/capture/multi-bracket-capture.js +113 -0
- package/lib/module/capture/multi-bracket-capture.js.map +1 -0
- package/lib/module/capture/shot-count-specified-interval-capture.js +1 -0
- package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -1
- package/lib/module/capture/time-shift-capture.js +9 -1
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/theta-repository/options/index.js +4 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-auto-bracket.js +2 -0
- package/lib/module/theta-repository/options/option-auto-bracket.js.map +1 -0
- package/lib/module/theta-repository/options/option-bluetooth-role.js +14 -0
- package/lib/module/theta-repository/options/option-bluetooth-role.js.map +1 -0
- package/lib/module/theta-repository/options/option-off-delay.js +35 -0
- package/lib/module/theta-repository/options/option-off-delay.js.map +1 -0
- package/lib/module/theta-repository/options/option-sleep-delay.js +35 -0
- package/lib/module/theta-repository/options/option-sleep-delay.js.map +1 -0
- package/lib/module/theta-repository/options/options.js +4 -32
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +47 -24
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/typescript/capture/burst-capture.d.ts +55 -0
- package/lib/typescript/capture/burst-capture.d.ts.map +1 -0
- package/lib/typescript/capture/composite-interval-capture.d.ts +47 -0
- package/lib/typescript/capture/composite-interval-capture.d.ts.map +1 -0
- package/lib/typescript/capture/continuous-capture.d.ts +49 -0
- package/lib/typescript/capture/continuous-capture.d.ts.map +1 -0
- package/lib/typescript/capture/index.d.ts +4 -0
- package/lib/typescript/capture/index.d.ts.map +1 -1
- package/lib/typescript/capture/multi-bracket-capture.d.ts +56 -0
- package/lib/typescript/capture/multi-bracket-capture.d.ts.map +1 -0
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts +1 -0
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -1
- package/lib/typescript/capture/time-shift-capture.d.ts +2 -1
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/index.d.ts +4 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-auto-bracket.d.ts +36 -0
- package/lib/typescript/theta-repository/options/option-auto-bracket.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-bluetooth-role.d.ts +14 -0
- package/lib/typescript/theta-repository/options/option-bluetooth-role.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-off-delay.d.ts +22 -0
- package/lib/typescript/theta-repository/options/option-off-delay.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-sleep-delay.d.ts +22 -0
- package/lib/typescript/theta-repository/options/option-sleep-delay.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/options.d.ts +12 -30
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +32 -2
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/capture/burst-capture.ts +169 -0
- package/src/capture/composite-interval-capture.ts +140 -0
- package/src/capture/continuous-capture.ts +126 -0
- package/src/capture/index.ts +4 -0
- package/src/capture/multi-bracket-capture.ts +145 -0
- package/src/capture/shot-count-specified-interval-capture.ts +1 -0
- package/src/capture/time-shift-capture.ts +19 -1
- package/src/theta-repository/options/index.ts +4 -0
- package/src/theta-repository/options/option-auto-bracket.ts +48 -0
- package/src/theta-repository/options/option-bluetooth-role.ts +15 -0
- package/src/theta-repository/options/option-off-delay.ts +38 -0
- package/src/theta-repository/options/option-sleep-delay.ts +37 -0
- package/src/theta-repository/options/options.ts +12 -38
- package/src/theta-repository/theta-repository.ts +68 -0
- 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,
|
|
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,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,+BAA+B,EAC/B,wCAAwC,EACxC,+BAA+B,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YAAY,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAE3E;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,cAAc,EAAE,GAC5B,OAAO,CAAC,OAAO,CAAC,CAElB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAElB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,eAAe,GAC3B,OAAO,CAAC,OAAO,CAAC,CAElB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,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.
|
|
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.
|
|
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
|
+
}
|
package/src/capture/index.ts
CHANGED
|
@@ -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(
|