theta-client-react-native 1.6.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 +1 -1
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/Converter.kt +115 -12
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +361 -1
- package/ios/ConvertUtil.swift +144 -19
- package/ios/ThetaClientReactNative.m +42 -0
- package/ios/ThetaClientReactNative.swift +419 -0
- package/lib/commonjs/capture/burst-capture.js +119 -0
- package/lib/commonjs/capture/burst-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 +33 -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/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 +33 -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-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 +30 -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 +38 -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/continuous-capture.js +100 -0
- package/lib/module/capture/continuous-capture.js.map +1 -0
- package/lib/module/capture/index.js +3 -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/theta-repository/options/index.js +3 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- 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 +2 -32
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +36 -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/continuous-capture.d.ts +49 -0
- package/lib/typescript/capture/continuous-capture.d.ts.map +1 -0
- package/lib/typescript/capture/index.d.ts +3 -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/theta-repository/options/index.d.ts +3 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- 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 +7 -30
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +24 -2
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capture/burst-capture.ts +169 -0
- package/src/capture/continuous-capture.ts +126 -0
- package/src/capture/index.ts +3 -0
- package/src/capture/multi-bracket-capture.ts +145 -0
- package/src/theta-repository/options/index.ts +3 -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 +7 -38
- package/src/theta-repository/theta-repository.ts +54 -0
- package/theta-client-react-native.podspec +1 -1
|
@@ -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,OAA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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
|
@@ -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,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
|
@@ -5,3 +5,6 @@ export * from './time-shift-capture';
|
|
|
5
5
|
export * from './limitless-interval-capture';
|
|
6
6
|
export * from './shot-count-specified-interval-capture';
|
|
7
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
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from './options';
|
|
|
2
2
|
export * from './option-ai-auto-thumbnail';
|
|
3
3
|
export * from './option-auto-bracket';
|
|
4
4
|
export * from './option-bitrate';
|
|
5
|
+
export * from './option-bluetooth-role';
|
|
5
6
|
export * from './option-burst-mode';
|
|
6
7
|
export * from './option-burst-option';
|
|
7
8
|
export * from './option-camera-control-source';
|
|
@@ -14,12 +15,14 @@ export * from './option-function';
|
|
|
14
15
|
export * from './option-gain';
|
|
15
16
|
export * from './option-image-stitching';
|
|
16
17
|
export * from './option-network-type';
|
|
18
|
+
export * from './option-off-delay';
|
|
17
19
|
export * from './option-power-saving';
|
|
18
20
|
export * from './option-preset';
|
|
19
21
|
export * from './option-preview-format';
|
|
20
22
|
export * from './option-proxy';
|
|
21
23
|
export * from './option-shooting-method';
|
|
22
24
|
export * from './option-shutter-speed';
|
|
25
|
+
export * from './option-sleep-delay';
|
|
23
26
|
export * from './option-time-shift';
|
|
24
27
|
export * from './option-top-bottom-correction';
|
|
25
28
|
export * from './option-top-bottom-correction-rotation';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role of the Bluetooth module.
|
|
3
|
+
*/
|
|
4
|
+
export const BluetoothRoleEnum = {
|
|
5
|
+
/** Central: ON, Peripheral: OFF */
|
|
6
|
+
CENTRAL: 'CENTRAL',
|
|
7
|
+
/** Central: OFF, Peripheral: ON */
|
|
8
|
+
PERIPHERAL: 'PERIPHERAL',
|
|
9
|
+
/** Central: ON, Peripheral: ON */
|
|
10
|
+
CENTRAL_PERIPHERAL: 'CENTRAL_PERIPHERAL',
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
/** Type definition of BluetoothRoleEnum */
|
|
14
|
+
export type BluetoothRoleEnum =
|
|
15
|
+
(typeof BluetoothRoleEnum)[keyof typeof BluetoothRoleEnum];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Length of standby time before the camera automatically powers OFF. */
|
|
2
|
+
export const OffDelayEnum = {
|
|
3
|
+
/** Do not turn power off. */
|
|
4
|
+
DISABLE: 'DISABLE',
|
|
5
|
+
/** Power off after 5 minutes.(300sec) */
|
|
6
|
+
OFF_DELAY_5M: 'OFF_DELAY_5M',
|
|
7
|
+
/** Power off after 10 minutes.(600sec) */
|
|
8
|
+
OFF_DELAY_10M: 'OFF_DELAY_10M',
|
|
9
|
+
/** Power off after 15 minutes.(900sec) */
|
|
10
|
+
OFF_DELAY_15M: 'OFF_DELAY_15M',
|
|
11
|
+
/** Power off after 30 minutes.(1,800sec) */
|
|
12
|
+
OFF_DELAY_30M: 'OFF_DELAY_30M',
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
/** type definition of OffDelayEnum */
|
|
16
|
+
export type OffDelayEnum =
|
|
17
|
+
| (typeof OffDelayEnum)[keyof typeof OffDelayEnum]
|
|
18
|
+
| number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get time(seconds) from OffDelayEnum
|
|
22
|
+
* @param offDelay enum of OffDelay
|
|
23
|
+
* @returns time(seconds)
|
|
24
|
+
*/
|
|
25
|
+
export function offDelayToSeconds(offDelay: OffDelayEnum): number {
|
|
26
|
+
if (typeof offDelay === 'number') {
|
|
27
|
+
return offDelay;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const table: Record<OffDelayEnum, number> = {
|
|
31
|
+
DISABLE: 0,
|
|
32
|
+
OFF_DELAY_5M: 300,
|
|
33
|
+
OFF_DELAY_10M: 600,
|
|
34
|
+
OFF_DELAY_15M: 900,
|
|
35
|
+
OFF_DELAY_30M: 1800,
|
|
36
|
+
};
|
|
37
|
+
return table[offDelay];
|
|
38
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Length of standby time before the camera enters the sleep mode. */
|
|
2
|
+
export const SleepDelayEnum = {
|
|
3
|
+
/** Do not turn sleep mode. */
|
|
4
|
+
DISABLE: 'DISABLE',
|
|
5
|
+
/** sleep mode after 3 minutes.(180seconds) */
|
|
6
|
+
SLEEP_DELAY_3M: 'SLEEP_DELAY_3M',
|
|
7
|
+
/** sleep mode after 5 minutes.(300seconds) */
|
|
8
|
+
SLEEP_DELAY_5M: 'SLEEP_DELAY_5M',
|
|
9
|
+
/** sleep mode after 7 minutes.(420seconds) */
|
|
10
|
+
SLEEP_DELAY_7M: 'SLEEP_DELAY_7M',
|
|
11
|
+
/** sleep mode after 10 minutes.(600seconds) */
|
|
12
|
+
SLEEP_DELAY_10M: 'SLEEP_DELAY_10M',
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
/** type definition of SleepDelayEnum */
|
|
16
|
+
export type SleepDelayEnum =
|
|
17
|
+
| (typeof SleepDelayEnum)[keyof typeof SleepDelayEnum]
|
|
18
|
+
| number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get time(seconds) from SleepDelayEnum
|
|
22
|
+
* @param offDelay enum of SleepDelay
|
|
23
|
+
* @returns time(seconds)
|
|
24
|
+
*/
|
|
25
|
+
export function sleepDelayToSeconds(sleepDelay: SleepDelayEnum): number {
|
|
26
|
+
if (typeof sleepDelay === 'number') {
|
|
27
|
+
return sleepDelay;
|
|
28
|
+
}
|
|
29
|
+
const table: Record<SleepDelayEnum, number> = {
|
|
30
|
+
DISABLE: 0,
|
|
31
|
+
SLEEP_DELAY_3M: 180,
|
|
32
|
+
SLEEP_DELAY_5M: 300,
|
|
33
|
+
SLEEP_DELAY_7M: 420,
|
|
34
|
+
SLEEP_DELAY_10M: 600,
|
|
35
|
+
};
|
|
36
|
+
return table[sleepDelay];
|
|
37
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AiAutoThumbnailEnum } from './option-ai-auto-thumbnail';
|
|
2
2
|
import type { BitrateEnum } from './option-bitrate';
|
|
3
|
+
import type { BluetoothRoleEnum } from './option-bluetooth-role';
|
|
3
4
|
import type { BracketSetting } from './option-auto-bracket';
|
|
4
5
|
import type { BurstModeEnum } from './option-burst-mode';
|
|
5
6
|
import type { BurstOption } from './option-burst-option';
|
|
@@ -26,6 +27,8 @@ import type { VideoStitchingEnum } from './option-video-stitching';
|
|
|
26
27
|
import type { VisibilityReductionEnum } from './option-visibility-reduction';
|
|
27
28
|
import type { WhiteBalanceAutoStrengthEnum } from './option-white-balance-auto-strength';
|
|
28
29
|
import type { WlanFrequencyEnum } from './option-wlan-frequency';
|
|
30
|
+
import type { OffDelayEnum } from './option-off-delay';
|
|
31
|
+
import type { SleepDelayEnum } from './option-sleep-delay';
|
|
29
32
|
|
|
30
33
|
/** Aperture value. */
|
|
31
34
|
export const ApertureEnum = {
|
|
@@ -376,44 +379,6 @@ export const MaxRecordableTimeEnum = {
|
|
|
376
379
|
export type MaxRecordableTimeEnum =
|
|
377
380
|
(typeof MaxRecordableTimeEnum)[keyof typeof MaxRecordableTimeEnum];
|
|
378
381
|
|
|
379
|
-
/** Length of standby time before the camera automatically powers OFF. */
|
|
380
|
-
export const OffDelayEnum = {
|
|
381
|
-
/** Do not turn power off. */
|
|
382
|
-
DISABLE: 'DISABLE',
|
|
383
|
-
/** Power off after 5 minutes.(300sec) */
|
|
384
|
-
OFF_DELAY_5M: 'OFF_DELAY_5M',
|
|
385
|
-
/** Power off after 10 minutes.(600sec) */
|
|
386
|
-
OFF_DELAY_10M: 'OFF_DELAY_10M',
|
|
387
|
-
/** Power off after 15 minutes.(900sec) */
|
|
388
|
-
OFF_DELAY_15M: 'OFF_DELAY_15M',
|
|
389
|
-
/** Power off after 30 minutes.(1,800sec) */
|
|
390
|
-
OFF_DELAY_30M: 'OFF_DELAY_30M',
|
|
391
|
-
} as const;
|
|
392
|
-
|
|
393
|
-
/** type definition of OffDelayEnum */
|
|
394
|
-
export type OffDelayEnum =
|
|
395
|
-
| (typeof OffDelayEnum)[keyof typeof OffDelayEnum]
|
|
396
|
-
| number;
|
|
397
|
-
|
|
398
|
-
/** Length of standby time before the camera enters the sleep mode. */
|
|
399
|
-
export const SleepDelayEnum = {
|
|
400
|
-
/** Do not turn sleep mode. */
|
|
401
|
-
DISABLE: 'DISABLE',
|
|
402
|
-
/** sleep mode after 3 minutes.(180seconds) */
|
|
403
|
-
SLEEP_DELAY_3M: 'SLEEP_DELAY_3M',
|
|
404
|
-
/** sleep mode after 5 minutes.(300seconds) */
|
|
405
|
-
SLEEP_DELAY_5M: 'SLEEP_DELAY_5M',
|
|
406
|
-
/** sleep mode after 7 minutes.(420seconds) */
|
|
407
|
-
SLEEP_DELAY_7M: 'SLEEP_DELAY_7M',
|
|
408
|
-
/** sleep mode after 10 minutes.(600seconds) */
|
|
409
|
-
SLEEP_DELAY_10M: 'SLEEP_DELAY_10M',
|
|
410
|
-
} as const;
|
|
411
|
-
|
|
412
|
-
/** type definition of SleepDelayEnum */
|
|
413
|
-
export type SleepDelayEnum =
|
|
414
|
-
| (typeof SleepDelayEnum)[keyof typeof SleepDelayEnum]
|
|
415
|
-
| number;
|
|
416
|
-
|
|
417
382
|
/** White balance. */
|
|
418
383
|
export const WhiteBalanceEnum = {
|
|
419
384
|
/** Automatic */
|
|
@@ -458,6 +423,8 @@ export const OptionNameEnum = {
|
|
|
458
423
|
Bitrate: 'Bitrate',
|
|
459
424
|
/** _bluetoothPower*/
|
|
460
425
|
BluetoothPower: 'BluetoothPower',
|
|
426
|
+
/** _bluetoothRole*/
|
|
427
|
+
BluetoothRole: 'BluetoothRole',
|
|
461
428
|
/** _burstMode*/
|
|
462
429
|
BurstMode: 'BurstMode',
|
|
463
430
|
/** _burstOption*/
|
|
@@ -580,6 +547,8 @@ export type Options = {
|
|
|
580
547
|
bitrate?: BitrateEnum;
|
|
581
548
|
/** BluetoothPower */
|
|
582
549
|
bluetoothPower?: BluetoothPowerEnum;
|
|
550
|
+
/** BluetoothRole */
|
|
551
|
+
bluetoothRole?: BluetoothRoleEnum;
|
|
583
552
|
/** BurstMode */
|
|
584
553
|
burstMode?: BurstModeEnum;
|
|
585
554
|
/** BurstOption */
|