theta-client-react-native 1.3.1 → 1.5.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 +441 -1035
- package/android/src/main/java/com/ricoh360/thetaclientreactnative/ThetaClientSdkModule.kt +327 -251
- package/ios/ConvertUtil.swift +1053 -0
- package/ios/ThetaClientReactNative-Bridging-Header.h +3 -0
- package/ios/ThetaClientReactNative.m +228 -0
- package/ios/ThetaClientReactNative.swift +1608 -0
- package/ios/ThetaClientReactNative.xcodeproj/project.pbxproj +15 -57
- package/lib/commonjs/capture/index.js +22 -0
- package/lib/commonjs/capture/index.js.map +1 -1
- package/lib/commonjs/capture/limitless-interval-capture.js +89 -0
- package/lib/commonjs/capture/limitless-interval-capture.js.map +1 -0
- package/lib/commonjs/capture/photo-capture.js +26 -3
- package/lib/commonjs/capture/photo-capture.js.map +1 -1
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js +112 -0
- package/lib/commonjs/capture/shot-count-specified-interval-capture.js.map +1 -0
- package/lib/commonjs/capture/time-shift-capture.js +27 -23
- package/lib/commonjs/capture/time-shift-capture.js.map +1 -1
- package/lib/commonjs/capture/video-capture.js +33 -5
- package/lib/commonjs/capture/video-capture.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theta-repository/notify-controller.js +40 -0
- package/lib/commonjs/theta-repository/notify-controller.js.map +1 -0
- package/lib/commonjs/theta-repository/options/index.js +88 -0
- package/lib/commonjs/theta-repository/options/index.js.map +1 -1
- package/lib/commonjs/theta-repository/options/option-face-detect.js +22 -0
- package/lib/commonjs/theta-repository/options/option-face-detect.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-function.js +27 -0
- package/lib/commonjs/theta-repository/options/option-function.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-gain.js +26 -0
- package/lib/commonjs/theta-repository/options/option-gain.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-image-stitching.js +38 -0
- package/lib/commonjs/theta-repository/options/option-image-stitching.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction-rotation.js +2 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction-rotation.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js +52 -0
- package/lib/commonjs/theta-repository/options/option-top-bottom-correction.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-video-stitching.js +24 -0
- package/lib/commonjs/theta-repository/options/option-video-stitching.js.map +1 -0
- package/lib/commonjs/theta-repository/options/option-visibility-reduction.js +23 -0
- package/lib/commonjs/theta-repository/options/option-visibility-reduction.js.map +1 -0
- package/lib/commonjs/theta-repository/options/options.js +18 -0
- package/lib/commonjs/theta-repository/options/options.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-repository.js +26 -4
- package/lib/commonjs/theta-repository/theta-repository.js.map +1 -1
- package/lib/commonjs/theta-repository/theta-state.js +1 -13
- package/lib/commonjs/theta-repository/theta-state.js.map +1 -1
- package/lib/module/capture/index.js +2 -0
- package/lib/module/capture/index.js.map +1 -1
- package/lib/module/capture/limitless-interval-capture.js +81 -0
- package/lib/module/capture/limitless-interval-capture.js.map +1 -0
- package/lib/module/capture/photo-capture.js +26 -3
- package/lib/module/capture/photo-capture.js.map +1 -1
- package/lib/module/capture/shot-count-specified-interval-capture.js +104 -0
- package/lib/module/capture/shot-count-specified-interval-capture.js.map +1 -0
- package/lib/module/capture/time-shift-capture.js +27 -23
- package/lib/module/capture/time-shift-capture.js.map +1 -1
- package/lib/module/capture/video-capture.js +33 -5
- package/lib/module/capture/video-capture.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/theta-repository/notify-controller.js +33 -0
- package/lib/module/theta-repository/notify-controller.js.map +1 -0
- package/lib/module/theta-repository/options/index.js +8 -0
- package/lib/module/theta-repository/options/index.js.map +1 -1
- package/lib/module/theta-repository/options/option-face-detect.js +15 -0
- package/lib/module/theta-repository/options/option-face-detect.js.map +1 -0
- package/lib/module/theta-repository/options/option-function.js +20 -0
- package/lib/module/theta-repository/options/option-function.js.map +1 -0
- package/lib/module/theta-repository/options/option-gain.js +19 -0
- package/lib/module/theta-repository/options/option-gain.js.map +1 -0
- package/lib/module/theta-repository/options/option-image-stitching.js +31 -0
- package/lib/module/theta-repository/options/option-image-stitching.js.map +1 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction-rotation.js +2 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction-rotation.js.map +1 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction.js +45 -0
- package/lib/module/theta-repository/options/option-top-bottom-correction.js.map +1 -0
- package/lib/module/theta-repository/options/option-video-stitching.js +17 -0
- package/lib/module/theta-repository/options/option-video-stitching.js.map +1 -0
- package/lib/module/theta-repository/options/option-visibility-reduction.js +16 -0
- package/lib/module/theta-repository/options/option-visibility-reduction.js.map +1 -0
- package/lib/module/theta-repository/options/options.js +18 -0
- package/lib/module/theta-repository/options/options.js.map +1 -1
- package/lib/module/theta-repository/theta-repository.js +25 -5
- package/lib/module/theta-repository/theta-repository.js.map +1 -1
- package/lib/module/theta-repository/theta-state.js +0 -12
- package/lib/module/theta-repository/theta-state.js.map +1 -1
- package/lib/typescript/capture/index.d.ts +2 -0
- package/lib/typescript/capture/index.d.ts.map +1 -1
- package/lib/typescript/capture/limitless-interval-capture.d.ts +40 -0
- package/lib/typescript/capture/limitless-interval-capture.d.ts.map +1 -0
- package/lib/typescript/capture/photo-capture.d.ts +8 -2
- package/lib/typescript/capture/photo-capture.d.ts.map +1 -1
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts +47 -0
- package/lib/typescript/capture/shot-count-specified-interval-capture.d.ts.map +1 -0
- package/lib/typescript/capture/time-shift-capture.d.ts +4 -7
- package/lib/typescript/capture/time-shift-capture.d.ts.map +1 -1
- package/lib/typescript/capture/video-capture.d.ts +5 -1
- package/lib/typescript/capture/video-capture.d.ts.map +1 -1
- package/lib/typescript/theta-repository/notify-controller.d.ts +17 -0
- package/lib/typescript/theta-repository/notify-controller.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/index.d.ts +8 -0
- package/lib/typescript/theta-repository/options/index.d.ts.map +1 -1
- package/lib/typescript/theta-repository/options/option-face-detect.d.ts +15 -0
- package/lib/typescript/theta-repository/options/option-face-detect.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-function.d.ts +20 -0
- package/lib/typescript/theta-repository/options/option-function.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-gain.d.ts +19 -0
- package/lib/typescript/theta-repository/options/option-gain.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-image-stitching.d.ts +30 -0
- package/lib/typescript/theta-repository/options/option-image-stitching.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction-rotation.d.ts +22 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction-rotation.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction.d.ts +45 -0
- package/lib/typescript/theta-repository/options/option-top-bottom-correction.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-video-stitching.d.ts +17 -0
- package/lib/typescript/theta-repository/options/option-video-stitching.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/option-visibility-reduction.d.ts +16 -0
- package/lib/typescript/theta-repository/options/option-visibility-reduction.d.ts.map +1 -0
- package/lib/typescript/theta-repository/options/options.d.ts +47 -0
- package/lib/typescript/theta-repository/options/options.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-repository.d.ts +17 -2
- package/lib/typescript/theta-repository/theta-repository.d.ts.map +1 -1
- package/lib/typescript/theta-repository/theta-state.d.ts +2 -12
- package/lib/typescript/theta-repository/theta-state.d.ts.map +1 -1
- package/package.json +17 -9
- package/src/capture/index.ts +2 -0
- package/src/capture/limitless-interval-capture.ts +99 -0
- package/src/capture/photo-capture.ts +27 -5
- package/src/capture/shot-count-specified-interval-capture.ts +146 -0
- package/src/capture/time-shift-capture.ts +40 -33
- package/src/capture/video-capture.ts +49 -6
- package/src/theta-repository/notify-controller.ts +50 -0
- package/src/theta-repository/options/index.ts +8 -0
- package/src/theta-repository/options/option-face-detect.ts +16 -0
- package/src/theta-repository/options/option-function.ts +21 -0
- package/src/theta-repository/options/option-gain.ts +19 -0
- package/src/theta-repository/options/option-image-stitching.ts +32 -0
- package/src/theta-repository/options/option-top-bottom-correction-rotation.ts +21 -0
- package/src/theta-repository/options/option-top-bottom-correction.ts +46 -0
- package/src/theta-repository/options/option-video-stitching.ts +18 -0
- package/src/theta-repository/options/option-visibility-reduction.ts +17 -0
- package/src/theta-repository/options/options.ts +47 -0
- package/src/theta-repository/theta-repository.ts +29 -4
- package/src/theta-repository/theta-state.ts +3 -15
- package/theta-client-react-native.podspec +2 -2
- package/ios/ThetaClientReactNative.h +0 -34
- package/ios/ThetaClientReactNative.mm +0 -4087
- package/lib/commonjs/capture/notify.js +0 -12
- package/lib/commonjs/capture/notify.js.map +0 -1
- package/lib/module/capture/notify.js +0 -6
- package/lib/module/capture/notify.js.map +0 -1
- package/lib/typescript/capture/notify.d.ts +0 -13
- package/lib/typescript/capture/notify.d.ts.map +0 -1
- package/src/capture/notify.ts +0 -27
|
@@ -5,24 +5,61 @@ import type {
|
|
|
5
5
|
} from '../theta-repository/options';
|
|
6
6
|
|
|
7
7
|
import { NativeModules } from 'react-native';
|
|
8
|
+
import {
|
|
9
|
+
BaseNotify,
|
|
10
|
+
NotifyController,
|
|
11
|
+
} from '../theta-repository/notify-controller';
|
|
8
12
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
9
13
|
|
|
14
|
+
const NOTIFY_NAME = 'VIDEO-CAPTURE-STOP-ERROR';
|
|
15
|
+
|
|
16
|
+
interface CaptureStopErrorNotify extends BaseNotify {
|
|
17
|
+
params?: {
|
|
18
|
+
message: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
10
22
|
/**
|
|
11
23
|
* VideoCapture class
|
|
12
24
|
*/
|
|
13
25
|
export class VideoCapture {
|
|
26
|
+
notify: NotifyController;
|
|
27
|
+
constructor(notify: NotifyController) {
|
|
28
|
+
this.notify = notify;
|
|
29
|
+
}
|
|
30
|
+
|
|
14
31
|
/**
|
|
15
32
|
* start video capture
|
|
33
|
+
* @param onStopFailed the block for error of stopCapture
|
|
16
34
|
* @return promise of captured file url
|
|
17
35
|
*/
|
|
18
|
-
startCapture(
|
|
19
|
-
|
|
36
|
+
startCapture(
|
|
37
|
+
onStopFailed?: (error: any) => void
|
|
38
|
+
): Promise<string | undefined> {
|
|
39
|
+
if (onStopFailed) {
|
|
40
|
+
this.notify.addNotify(NOTIFY_NAME, (event: CaptureStopErrorNotify) => {
|
|
41
|
+
onStopFailed(event.params);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return new Promise<string | undefined>(async (resolve, reject) => {
|
|
45
|
+
await ThetaClientReactNative.startVideoCapture()
|
|
46
|
+
.then((result?: string) => {
|
|
47
|
+
resolve(result ?? undefined);
|
|
48
|
+
})
|
|
49
|
+
.catch((error: any) => {
|
|
50
|
+
reject(error);
|
|
51
|
+
})
|
|
52
|
+
.finally(() => {
|
|
53
|
+
this.notify.removeNotify(NOTIFY_NAME);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
20
56
|
}
|
|
57
|
+
|
|
21
58
|
/**
|
|
22
59
|
* stop video capture
|
|
23
60
|
*/
|
|
24
61
|
stopCapture() {
|
|
25
|
-
ThetaClientReactNative.
|
|
62
|
+
ThetaClientReactNative.stopVideoCapture();
|
|
26
63
|
}
|
|
27
64
|
}
|
|
28
65
|
|
|
@@ -62,8 +99,14 @@ export class VideoCaptureBuilder extends CaptureBuilder<VideoCaptureBuilder> {
|
|
|
62
99
|
* @return promise of VideoCapture instance
|
|
63
100
|
*/
|
|
64
101
|
build(): Promise<VideoCapture> {
|
|
65
|
-
return
|
|
66
|
-
|
|
67
|
-
|
|
102
|
+
return new Promise<VideoCapture>(async (resolve, reject) => {
|
|
103
|
+
try {
|
|
104
|
+
await ThetaClientReactNative.getVideoCaptureBuilder();
|
|
105
|
+
await ThetaClientReactNative.buildVideoCapture(this.options);
|
|
106
|
+
resolve(new VideoCapture(NotifyController.instance));
|
|
107
|
+
} catch (error) {
|
|
108
|
+
reject(error);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
68
111
|
}
|
|
69
112
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NativeEventEmitter,
|
|
3
|
+
type EmitterSubscription,
|
|
4
|
+
NativeModules,
|
|
5
|
+
} from 'react-native';
|
|
6
|
+
|
|
7
|
+
export interface BaseNotify {
|
|
8
|
+
name: string;
|
|
9
|
+
params?: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class NotifyController {
|
|
13
|
+
static _instance = new NotifyController();
|
|
14
|
+
static get instance(): NotifyController {
|
|
15
|
+
return NotifyController._instance;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
eventListener?: EmitterSubscription = undefined;
|
|
19
|
+
notifyList = new Map<string, ((notify: BaseNotify) => void) | undefined>();
|
|
20
|
+
|
|
21
|
+
init() {
|
|
22
|
+
this.release();
|
|
23
|
+
this.eventListener = this.addNotifyListener((notify: BaseNotify) => {
|
|
24
|
+
this.notifyList.get(notify.name)?.(notify as BaseNotify);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
release() {
|
|
29
|
+
this.eventListener?.remove();
|
|
30
|
+
this.eventListener = undefined;
|
|
31
|
+
this.notifyList.clear();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
addNotify(name: string, callback: (notify: BaseNotify) => void) {
|
|
35
|
+
this.notifyList.set(name, callback);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
removeNotify(name: string) {
|
|
39
|
+
this.notifyList.delete(name);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private addNotifyListener(
|
|
43
|
+
callback: (event: BaseNotify) => void
|
|
44
|
+
): EmitterSubscription {
|
|
45
|
+
const eventEmitter = new NativeEventEmitter(
|
|
46
|
+
NativeModules.ThetaClientReactNative
|
|
47
|
+
);
|
|
48
|
+
return eventEmitter.addListener('ThetaNotify', callback);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -7,7 +7,11 @@ export * from './option-camera-control-source';
|
|
|
7
7
|
export * from './option-camera-mode';
|
|
8
8
|
export * from './option-capture-mode';
|
|
9
9
|
export * from './option-continuous-number';
|
|
10
|
+
export * from './option-face-detect';
|
|
10
11
|
export * from './option-filter';
|
|
12
|
+
export * from './option-function';
|
|
13
|
+
export * from './option-gain';
|
|
14
|
+
export * from './option-image-stitching';
|
|
11
15
|
export * from './option-network-type';
|
|
12
16
|
export * from './option-power-saving';
|
|
13
17
|
export * from './option-preset';
|
|
@@ -16,5 +20,9 @@ export * from './option-proxy';
|
|
|
16
20
|
export * from './option-shooting-method';
|
|
17
21
|
export * from './option-shutter-speed';
|
|
18
22
|
export * from './option-time-shift';
|
|
23
|
+
export * from './option-top-bottom-correction';
|
|
24
|
+
export * from './option-top-bottom-correction-rotation';
|
|
25
|
+
export * from './option-video-stitching';
|
|
26
|
+
export * from './option-visibility-reduction';
|
|
19
27
|
export * from './option-white-balance-auto-strength';
|
|
20
28
|
export * from './option-wlan-frequency';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Face detection
|
|
3
|
+
*
|
|
4
|
+
* For
|
|
5
|
+
* - RICOH THETA X
|
|
6
|
+
*/
|
|
7
|
+
export const FaceDetectEnum = {
|
|
8
|
+
/** Face detection ON */
|
|
9
|
+
ON: 'ON',
|
|
10
|
+
/** Face detection OFF */
|
|
11
|
+
OFF: 'OFF',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
/** type definition of FaceDetectEnum */
|
|
15
|
+
export type FaceDetectEnum =
|
|
16
|
+
(typeof FaceDetectEnum)[keyof typeof FaceDetectEnum];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shooting function.
|
|
3
|
+
* Shooting settings are retained separately for both the Still image shooting mode and Video shooting mode.
|
|
4
|
+
* Setting them at the same time as exposureDelay will result in an error.
|
|
5
|
+
*
|
|
6
|
+
* For
|
|
7
|
+
* - RICOH THETA X
|
|
8
|
+
* - RICOH THETA Z1
|
|
9
|
+
*/
|
|
10
|
+
export const ShootingFunctionEnum = {
|
|
11
|
+
/** Normal shooting function */
|
|
12
|
+
NORMAL: 'NORMAL',
|
|
13
|
+
/** Self-timer shooting function(RICOH THETA X is not supported.) */
|
|
14
|
+
SELF_TIMER: 'SELF_TIMER',
|
|
15
|
+
/** My setting shooting function */
|
|
16
|
+
MY_SETTING: 'MY_SETTING',
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
/** type definition of ShootingFunctionEnum */
|
|
20
|
+
export type ShootingFunctionEnum =
|
|
21
|
+
(typeof ShootingFunctionEnum)[keyof typeof ShootingFunctionEnum];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Microphone gain.
|
|
3
|
+
*
|
|
4
|
+
* For
|
|
5
|
+
* - RICOH THETA X
|
|
6
|
+
* - RICOH THETA Z1
|
|
7
|
+
* - RICOH THETA V
|
|
8
|
+
*/
|
|
9
|
+
export const GainEnum = {
|
|
10
|
+
/** Normal mode */
|
|
11
|
+
NORMAL: 'NORMAL',
|
|
12
|
+
/** Loud volume mode */
|
|
13
|
+
MEGA_VOLUME: 'MEGA_VOLUME',
|
|
14
|
+
/** Mute mode (RICOH THETA V firmware v2.50.1 or later, RICOH THETA X is not supported.) */
|
|
15
|
+
MUTE: 'MUTE',
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
/** type definition of GainEnum */
|
|
19
|
+
export type GainEnum = (typeof GainEnum)[keyof typeof GainEnum];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Still image stitching setting during shooting.
|
|
3
|
+
*
|
|
4
|
+
* For Theta X, Z1 and V.
|
|
5
|
+
**/
|
|
6
|
+
|
|
7
|
+
export const ImageStitchingEnum = {
|
|
8
|
+
/** Refer to stitching when shooting with "auto" */
|
|
9
|
+
AUTO: 'AUTO',
|
|
10
|
+
/** Performs static stitching */
|
|
11
|
+
STATIC: 'STATIC',
|
|
12
|
+
/** Performs dynamic stitching(RICOH THETA X or later) */
|
|
13
|
+
DYNAMIC: 'DYNAMIC',
|
|
14
|
+
/** For Normal shooting, performs dynamic stitching,
|
|
15
|
+
* for Interval shooting, saves dynamic distortion correction parameters for the first image
|
|
16
|
+
* and then uses them for the 2nd and subsequent images(RICOH THETA X is not supported) */
|
|
17
|
+
DYNAMIC_AUTO: 'DYNAMIC_AUTO',
|
|
18
|
+
/** Performs semi-dynamic stitching
|
|
19
|
+
* Saves dynamic distortion correction parameters for the first image
|
|
20
|
+
* and then uses them for the 2nd and subsequent images(RICOH THETA X or later) */
|
|
21
|
+
DYNAMIC_SEMI_AUTO: 'DYNAMIC_SEMI_AUTO',
|
|
22
|
+
/** Performs dynamic stitching and then saves distortion correction parameters */
|
|
23
|
+
DYNAMIC_SAVE: 'DYNAMIC_SAVE',
|
|
24
|
+
/** Performs stitching using the saved distortion correction parameters */
|
|
25
|
+
DYNAMIC_LOAD: 'DYNAMIC_LOAD',
|
|
26
|
+
/** Does not perform stitching */
|
|
27
|
+
NONE: 'NONE',
|
|
28
|
+
} as const;
|
|
29
|
+
|
|
30
|
+
/** Type definition of ImageStitchingEnum */
|
|
31
|
+
export type ImageStitchingEnum =
|
|
32
|
+
(typeof ImageStitchingEnum)[keyof typeof ImageStitchingEnum];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets the front position for the top/bottom correction.
|
|
3
|
+
* Enabled only for _topBottomCorrection Manual.
|
|
4
|
+
*/
|
|
5
|
+
export type TopBottomCorrectionRotation = {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies the pitch.
|
|
8
|
+
* Specified range is -90.0 to +90.0, stepSize is 0.1
|
|
9
|
+
*/
|
|
10
|
+
pitch: number;
|
|
11
|
+
/**
|
|
12
|
+
* Specifies the roll.
|
|
13
|
+
* Specified range is -180.0 to +180.0, stepSize is 0.1
|
|
14
|
+
*/
|
|
15
|
+
roll: number;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies the yaw.
|
|
18
|
+
* Specified range is -180.0 to +180.0, stepSize is 0.1
|
|
19
|
+
*/
|
|
20
|
+
yaw: number;
|
|
21
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* top bottom correction
|
|
3
|
+
*
|
|
4
|
+
* Sets the top/bottom correction. For RICOH THETA V and RICOH
|
|
5
|
+
* THETA Z1, the top/bottom correction can be set only for still
|
|
6
|
+
* images. For RICOH THETA X, the top/bottom correction can be
|
|
7
|
+
* set for both still images and videos.
|
|
8
|
+
*/
|
|
9
|
+
export const TopBottomCorrectionOptionEnum = {
|
|
10
|
+
/**
|
|
11
|
+
* Top/bottom correction is performed.
|
|
12
|
+
*/
|
|
13
|
+
APPLY: 'APPLY',
|
|
14
|
+
/**
|
|
15
|
+
* Refer to top/bottom correction when shooting with "ApplyAuto"
|
|
16
|
+
*/
|
|
17
|
+
APPLY_AUTO: 'APPLY_AUTO',
|
|
18
|
+
/**
|
|
19
|
+
* Top/bottom correction is performed. The parameters used for
|
|
20
|
+
* top/bottom correction for the first image are saved and used
|
|
21
|
+
* for the 2nd and subsequent images.(RICOH THETA X or later)
|
|
22
|
+
*/
|
|
23
|
+
APPLY_SEMIAUTO: 'APPLY_SEMIAUTO',
|
|
24
|
+
/**
|
|
25
|
+
* Performs top/bottom correction and then saves the parameters.
|
|
26
|
+
*/
|
|
27
|
+
APPLY_SAVE: 'APPLY_SAVE',
|
|
28
|
+
/**
|
|
29
|
+
* Performs top/bottom correction using the saved parameters.
|
|
30
|
+
*/
|
|
31
|
+
APPLY_LOAD: 'APPLY_LOAD',
|
|
32
|
+
/**
|
|
33
|
+
* Does not perform top/bottom correction.
|
|
34
|
+
*/
|
|
35
|
+
DISAPPLY: 'DISAPPLY',
|
|
36
|
+
/**
|
|
37
|
+
* Performs the top/bottom correction with the specified front
|
|
38
|
+
* position. The front position can be specified with
|
|
39
|
+
* _topBottomCorrectionRotation.
|
|
40
|
+
*/
|
|
41
|
+
MANUAL: 'MANUAL',
|
|
42
|
+
} as const;
|
|
43
|
+
|
|
44
|
+
/** type definition of TopBottomCorrectionOptionEnum */
|
|
45
|
+
export type TopBottomCorrectionOptionEnum =
|
|
46
|
+
(typeof TopBottomCorrectionOptionEnum)[keyof typeof TopBottomCorrectionOptionEnum];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video Stitching
|
|
3
|
+
*
|
|
4
|
+
* For
|
|
5
|
+
* - RICOH THETA X
|
|
6
|
+
* - RICOH THETA Z1
|
|
7
|
+
* - RICOH THETA V
|
|
8
|
+
*/
|
|
9
|
+
export const VideoStitchingEnum = {
|
|
10
|
+
/** Stitching is OFF */
|
|
11
|
+
NONE: 'NONE',
|
|
12
|
+
/** Stitching by the camera is ON */
|
|
13
|
+
ONDEVICE: 'ONDEVICE',
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
/** type definition of VideoStitchingEnum */
|
|
17
|
+
export type VideoStitchingEnum =
|
|
18
|
+
(typeof VideoStitchingEnum)[keyof typeof VideoStitchingEnum];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visibility reduction.
|
|
3
|
+
* Reduction visibility of camera body to still image when stitching.
|
|
4
|
+
*
|
|
5
|
+
* For
|
|
6
|
+
* - RICOH THETA Z1 v1.11.1 or later
|
|
7
|
+
*/
|
|
8
|
+
export const VisibilityReductionEnum = {
|
|
9
|
+
/** ON */
|
|
10
|
+
ON: 'ON',
|
|
11
|
+
/** OFF */
|
|
12
|
+
OFF: 'OFF',
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
/** type definition of visibilityReductionEnum */
|
|
16
|
+
export type VisibilityReductionEnum =
|
|
17
|
+
(typeof VisibilityReductionEnum)[keyof typeof VisibilityReductionEnum];
|
|
@@ -6,7 +6,11 @@ import type { CameraControlSourceEnum } from './option-camera-control-source';
|
|
|
6
6
|
import type { CameraModeEnum } from './option-camera-mode';
|
|
7
7
|
import type { CaptureModeEnum } from './option-capture-mode';
|
|
8
8
|
import type { ContinuousNumberEnum } from './option-continuous-number';
|
|
9
|
+
import type { FaceDetectEnum } from './option-face-detect';
|
|
9
10
|
import type { FilterEnum } from './option-filter';
|
|
11
|
+
import type { ShootingFunctionEnum } from './option-function';
|
|
12
|
+
import type { GainEnum } from './option-gain';
|
|
13
|
+
import type { ImageStitchingEnum } from './option-image-stitching';
|
|
10
14
|
import type { NetworkTypeEnum } from './option-network-type';
|
|
11
15
|
import type { PowerSavingEnum } from './option-power-saving';
|
|
12
16
|
import type { PresetEnum } from './option-preset';
|
|
@@ -15,6 +19,10 @@ import type { Proxy } from './option-proxy';
|
|
|
15
19
|
import type { ShootingMethodEnum } from './option-shooting-method';
|
|
16
20
|
import type { ShutterSpeedEnum } from './option-shutter-speed';
|
|
17
21
|
import type { TimeShift } from './option-time-shift';
|
|
22
|
+
import type { TopBottomCorrectionOptionEnum } from './option-top-bottom-correction';
|
|
23
|
+
import type { TopBottomCorrectionRotation } from './option-top-bottom-correction-rotation';
|
|
24
|
+
import type { VideoStitchingEnum } from './option-video-stitching';
|
|
25
|
+
import type { VisibilityReductionEnum } from './option-visibility-reduction';
|
|
18
26
|
import type { WhiteBalanceAutoStrengthEnum } from './option-white-balance-auto-strength';
|
|
19
27
|
import type { WlanFrequencyEnum } from './option-wlan-frequency';
|
|
20
28
|
|
|
@@ -477,12 +485,20 @@ export const OptionNameEnum = {
|
|
|
477
485
|
ExposureDelay: 'ExposureDelay',
|
|
478
486
|
/** exposureProgram */
|
|
479
487
|
ExposureProgram: 'ExposureProgram',
|
|
488
|
+
/** _faceDetect */
|
|
489
|
+
FaceDetect: 'FaceDetect',
|
|
480
490
|
/** fileFormat */
|
|
481
491
|
FileFormat: 'FileFormat',
|
|
482
492
|
/** filter */
|
|
483
493
|
Filter: 'Filter',
|
|
494
|
+
/** _function */
|
|
495
|
+
Function: 'Function',
|
|
496
|
+
/** _gain */
|
|
497
|
+
Gain: 'Gain',
|
|
484
498
|
/** gpsInfo */
|
|
485
499
|
GpsInfo: 'GpsInfo',
|
|
500
|
+
/** imageStitching */
|
|
501
|
+
ImageStitching: 'ImageStitching',
|
|
486
502
|
/** isGpsOn */
|
|
487
503
|
IsGpsOn: 'IsGpsOn',
|
|
488
504
|
/** iso */
|
|
@@ -491,6 +507,8 @@ export const OptionNameEnum = {
|
|
|
491
507
|
IsoAutoHighLimit: 'IsoAutoHighLimit',
|
|
492
508
|
/** language */
|
|
493
509
|
Language: 'Language',
|
|
510
|
+
/** _latestEnabledExposureDelayTime */
|
|
511
|
+
LatestEnabledExposureDelayTime: 'LatestEnabledExposureDelayTime',
|
|
494
512
|
/** maxRecordableTime */
|
|
495
513
|
MaxRecordableTime: 'MaxRecordableTime',
|
|
496
514
|
/** networkType */
|
|
@@ -521,12 +539,20 @@ export const OptionNameEnum = {
|
|
|
521
539
|
RemainingSpace: 'RemainingSpace',
|
|
522
540
|
/** timeShift */
|
|
523
541
|
TimeShift: 'TimeShift',
|
|
542
|
+
/** topBottomCorrection */
|
|
543
|
+
TopBottomCorrection: 'TopBottomCorrection',
|
|
544
|
+
/** topBottomCorrectionRotation */
|
|
545
|
+
TopBottomCorrectionRotation: 'TopBottomCorrectionRotation',
|
|
524
546
|
/** totalSpace */
|
|
525
547
|
TotalSpace: 'TotalSpace',
|
|
526
548
|
/** shutterVolume */
|
|
527
549
|
ShutterVolume: 'ShutterVolume',
|
|
528
550
|
/** username */
|
|
529
551
|
Username: 'Username',
|
|
552
|
+
/** videoStitching */
|
|
553
|
+
VideoStitching: 'VideoStitching',
|
|
554
|
+
/** _visibilityReduction */
|
|
555
|
+
VisibilityReduction: 'VisibilityReduction',
|
|
530
556
|
/** whiteBalance */
|
|
531
557
|
WhiteBalance: 'WhiteBalance',
|
|
532
558
|
/** _whiteBalanceAutoStrength */
|
|
@@ -630,12 +656,20 @@ export type Options = {
|
|
|
630
656
|
exposureDelay?: ExposureDelayEnum;
|
|
631
657
|
/** Exposure program. The exposure settings that take priority can be selected. */
|
|
632
658
|
exposureProgram?: ExposureProgramEnum;
|
|
659
|
+
/** Face detection */
|
|
660
|
+
faceDetect?: FaceDetectEnum;
|
|
633
661
|
/** Image format used in shooting. */
|
|
634
662
|
fileFormat?: PhotoFileFormatEnum | VideoFileFormatEnum;
|
|
635
663
|
/** Image processing filter. */
|
|
636
664
|
filter?: FilterEnum;
|
|
665
|
+
/** Shooting function. */
|
|
666
|
+
function?: ShootingFunctionEnum;
|
|
667
|
+
/** Microphone gain. */
|
|
668
|
+
gain?: GainEnum;
|
|
637
669
|
/** GPS location information. */
|
|
638
670
|
gpsInfo?: GpsInfo;
|
|
671
|
+
/** Still image stitching setting during shooting. */
|
|
672
|
+
imageStitching?: ImageStitchingEnum;
|
|
639
673
|
/** Turns position information assigning ON/OFF. */
|
|
640
674
|
isGpsOn?: boolean;
|
|
641
675
|
/** ISO sensitivity */
|
|
@@ -644,6 +678,8 @@ export type Options = {
|
|
|
644
678
|
isoAutoHighLimit?: IsoAutoHighLimitEnum;
|
|
645
679
|
/** Language used in camera OS. */
|
|
646
680
|
language?: LanguageEnum;
|
|
681
|
+
/** Self-timer operating time (sec.) when the self-timer (exposureDelay) was effective. */
|
|
682
|
+
latestEnabledExposureDelayTime?: ExposureDelayEnum;
|
|
647
683
|
/** Maximum recordable time (in seconds) of the camera. */
|
|
648
684
|
maxRecordableTime?: MaxRecordableTimeEnum;
|
|
649
685
|
/** Network type of the camera */
|
|
@@ -681,10 +717,21 @@ export type Options = {
|
|
|
681
717
|
sleepDelay?: SleepDelayEnum;
|
|
682
718
|
/** Time shift shooting */
|
|
683
719
|
timeShift?: TimeShift;
|
|
720
|
+
/** top bottom correction */
|
|
721
|
+
topBottomCorrection?: TopBottomCorrectionOptionEnum;
|
|
722
|
+
/**
|
|
723
|
+
* Sets the front position for the top/bottom correction.
|
|
724
|
+
* Enabled only for _topBottomCorrection Manual.
|
|
725
|
+
*/
|
|
726
|
+
topBottomCorrectionRotation?: TopBottomCorrectionRotation;
|
|
684
727
|
/** Total storage space (byte). */
|
|
685
728
|
totalSpace?: number;
|
|
686
729
|
/** User name used for digest authentication when _networkType is set to client mode. */
|
|
687
730
|
username?: String;
|
|
731
|
+
/** Video stitching during shooting. */
|
|
732
|
+
videoStitching?: VideoStitchingEnum;
|
|
733
|
+
/** Reduction visibility of camera body to still image when stitching. */
|
|
734
|
+
visibilityReduction?: VisibilityReductionEnum;
|
|
688
735
|
/** White balance. */
|
|
689
736
|
whiteBalance?: WhiteBalanceEnum;
|
|
690
737
|
/** White balance auto strength. */
|
|
@@ -16,9 +16,12 @@ import {
|
|
|
16
16
|
PhotoCaptureBuilder,
|
|
17
17
|
VideoCaptureBuilder,
|
|
18
18
|
TimeShiftCaptureBuilder,
|
|
19
|
+
LimitlessIntervalCaptureBuilder,
|
|
20
|
+
ShotCountSpecifiedIntervalCaptureBuilder,
|
|
19
21
|
} from '../capture';
|
|
20
22
|
import type { ThetaConfig } from './theta-config';
|
|
21
23
|
import type { ThetaTimeout } from './theta-timeout';
|
|
24
|
+
import { NotifyController } from './notify-controller';
|
|
22
25
|
const ThetaClientReactNative = NativeModules.ThetaClientReactNative;
|
|
23
26
|
|
|
24
27
|
/**
|
|
@@ -35,6 +38,8 @@ export function initialize(
|
|
|
35
38
|
config?: ThetaConfig,
|
|
36
39
|
timeout?: ThetaTimeout
|
|
37
40
|
): Promise<boolean> {
|
|
41
|
+
NotifyController.instance.init();
|
|
42
|
+
|
|
38
43
|
return ThetaClientReactNative.initialize(endPoint, config, timeout);
|
|
39
44
|
}
|
|
40
45
|
|
|
@@ -66,7 +71,6 @@ export function reset(): Promise<boolean> {
|
|
|
66
71
|
* @return created PhotoCaptureBuilder
|
|
67
72
|
*/
|
|
68
73
|
export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
|
|
69
|
-
ThetaClientReactNative.getPhotoCaptureBuilder();
|
|
70
74
|
return new PhotoCaptureBuilder();
|
|
71
75
|
}
|
|
72
76
|
|
|
@@ -77,21 +81,42 @@ export function getPhotoCaptureBuilder(): PhotoCaptureBuilder {
|
|
|
77
81
|
* @return created TimeShiftCaptureBuilder
|
|
78
82
|
*/
|
|
79
83
|
export function getTimeShiftCaptureBuilder(): TimeShiftCaptureBuilder {
|
|
80
|
-
ThetaClientReactNative.getTimeShiftCaptureBuilder();
|
|
81
84
|
return new TimeShiftCaptureBuilder();
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
/**
|
|
85
|
-
* Get
|
|
88
|
+
* Get VideoCapture.Builder for capture video.
|
|
86
89
|
*
|
|
87
90
|
* @function getVideoCaptureBuilder
|
|
88
91
|
* @return created VideoCaptureBuilder instance
|
|
89
92
|
*/
|
|
90
93
|
export function getVideoCaptureBuilder(): VideoCaptureBuilder {
|
|
91
|
-
ThetaClientReactNative.getVideoCaptureBuilder();
|
|
92
94
|
return new VideoCaptureBuilder();
|
|
93
95
|
}
|
|
94
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Get LimitlessIntervalCapture.Builder for take limitless interval shooting.
|
|
99
|
+
*
|
|
100
|
+
* @function getLimitlessIntervalCaptureBuilder
|
|
101
|
+
* @return created LimitlessIntervalCaptureBuilder instance
|
|
102
|
+
*/
|
|
103
|
+
export function getLimitlessIntervalCaptureBuilder(): LimitlessIntervalCaptureBuilder {
|
|
104
|
+
return new LimitlessIntervalCaptureBuilder();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get ShotCountSpecifiedIntervalCapture.Builder for take interval shooting with the shot count specified.
|
|
109
|
+
*
|
|
110
|
+
* @function getShotCountSpecifiedIntervalCaptureBuilder
|
|
111
|
+
* @param {shotCount} shot count specified
|
|
112
|
+
* @return created ShotCountSpecifiedIntervalCaptureBuilder instance
|
|
113
|
+
*/
|
|
114
|
+
export function getShotCountSpecifiedIntervalCaptureBuilder(
|
|
115
|
+
shotCount: number
|
|
116
|
+
): ShotCountSpecifiedIntervalCaptureBuilder {
|
|
117
|
+
return new ShotCountSpecifiedIntervalCaptureBuilder(shotCount);
|
|
118
|
+
}
|
|
119
|
+
|
|
95
120
|
/**
|
|
96
121
|
* Start live preview.
|
|
97
122
|
* preview frame (JPEG DataURL) send THETA_EVENT_NAME event as
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ShootingFunctionEnum } from './options/option-function';
|
|
2
|
+
|
|
1
3
|
/** Battery charging state constants */
|
|
2
4
|
export const ChargingStateEnum = {
|
|
3
5
|
/** Charging */
|
|
@@ -36,20 +38,6 @@ export const CaptureStatusEnum = {
|
|
|
36
38
|
export type CaptureStatusEnum =
|
|
37
39
|
(typeof CaptureStatusEnum)[keyof typeof CaptureStatusEnum];
|
|
38
40
|
|
|
39
|
-
/** Shooting function status constants */
|
|
40
|
-
export const ShootingFunctionEnum = {
|
|
41
|
-
/** normal */
|
|
42
|
-
NORMAL: 'NORMAL',
|
|
43
|
-
/** selfTimer */
|
|
44
|
-
SELF_TIMER: 'SELF_TIMER',
|
|
45
|
-
/** mySetting */
|
|
46
|
-
MY_SETTING: 'MY_SETTING',
|
|
47
|
-
} as const;
|
|
48
|
-
|
|
49
|
-
/** type definition of ShootingFunctionEnum */
|
|
50
|
-
export type ShootingFunctionEnum =
|
|
51
|
-
(typeof ShootingFunctionEnum)[keyof typeof ShootingFunctionEnum];
|
|
52
|
-
|
|
53
41
|
/** Microphone option constants */
|
|
54
42
|
export const MicrophoneOptionEnum = {
|
|
55
43
|
/** auto */
|
|
@@ -150,7 +138,7 @@ export type ThetaState = {
|
|
|
150
138
|
/** Plugin web server state (true: enabled, false: disabled) */
|
|
151
139
|
isPluginWebServer: boolean | null;
|
|
152
140
|
/** Shooting function status*/
|
|
153
|
-
function: ShootingFunctionEnum;
|
|
141
|
+
function: ShootingFunctionEnum | null;
|
|
154
142
|
/** My setting changed state */
|
|
155
143
|
isMySettingChanged: boolean | null;
|
|
156
144
|
/** Identifies the microphone used while recording video */
|
|
@@ -14,10 +14,10 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.platforms = { :ios => "15.0" }
|
|
15
15
|
s.source = { :git => "git@github.com:ricohapi/theta-client.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
|
-
s.source_files = "ios/**/*.{h,m,mm}"
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "THETAClient", "1.
|
|
20
|
+
s.dependency "THETAClient", "1.5.0"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
23
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
3
|
-
#import "RNThetaClientReactNativeSpec.h"
|
|
4
|
-
#import <React/RCTEventEmitter.h>
|
|
5
|
-
|
|
6
|
-
@interface ThetaClientReactNative : RCTEventEmitter <NativeThetaClientReactNativeSpec>
|
|
7
|
-
#else
|
|
8
|
-
#import <React/RCTBridgeModule.h>
|
|
9
|
-
#import <React/RCTEventEmitter.h>
|
|
10
|
-
|
|
11
|
-
@interface ThetaClientReactNative : RCTEventEmitter <RCTBridgeModule>
|
|
12
|
-
#endif
|
|
13
|
-
|
|
14
|
-
/** theta repository instance */
|
|
15
|
-
@property(nonatomic, strong) THETACThetaRepository *theta;
|
|
16
|
-
/** photoCapture builder instance */
|
|
17
|
-
@property(nonatomic, strong) THETACPhotoCaptureBuilder *photoCaptureBuilder;
|
|
18
|
-
/** photoCapture instance */
|
|
19
|
-
@property(nonatomic, strong) THETACPhotoCapture *photoCapture;
|
|
20
|
-
/** timeShiftCapture builder instance */
|
|
21
|
-
@property(nonatomic, strong) THETACTimeShiftCaptureBuilder *timeShiftCaptureBuilder;
|
|
22
|
-
/** timeShiftCapture instance */
|
|
23
|
-
@property(nonatomic, strong) THETACTimeShiftCapture *timeShiftCapture;
|
|
24
|
-
/** timeShiftCapturing instance */
|
|
25
|
-
@property(nonatomic, strong) THETACTimeShiftCapturing *timeShiftCapturing;
|
|
26
|
-
/** videoCapture builder instance */
|
|
27
|
-
@property(nonatomic, strong) THETACVideoCaptureBuilder *videoCaptureBuilder;
|
|
28
|
-
/** videoCapture instance */
|
|
29
|
-
@property(nonatomic, strong) THETACVideoCapture *videoCapture;
|
|
30
|
-
/** videoCapturing instance */
|
|
31
|
-
@property(nonatomic, strong) THETACVideoCapturing *videoCapturing;
|
|
32
|
-
/** previewing in progress flag */
|
|
33
|
-
@property(nonatomic) BOOL previewing;
|
|
34
|
-
@end
|